This Github action simplifies the creation of simple build tasks.
Usage
The following example creates and builds a buildtask.
First, create a file commander.yml at the root of the project. This file is the entrypoint for the task generation, each command will be executed during the build process.
# commander.ymllaraboot-commander:commands: - ls - pwd - git --version
The following is an example of how the build and publish processes work together in a CI environment. It considers OCI registry for publication. In this case docker hub.
# .github/workflows/actions.yml# This is a basic workflow to help you get started with Laraboot using Github Actionsname:CI# Controls when the action will run. Triggers the workflow on push or pull request# events but only for the master branchon:push:branches: - next# A workflow run is made up of one or more jobs that can run sequentially or in paralleljobs:build:runs-on:ubuntu-lateststeps: - uses:actions/checkout@v2 - uses:buildpacks/github-actions/setup-pack@v4.1.0 - uses:actions/setup-go@v1with:go-version:1.16.x - uses:actions/setup-node@v1with:node-version:12 - name:Setup laraboot CLIenv:NODE_AUTH_TOKEN:${{secrets.NODE_AUTH_TOKEN}}uses:laraboot-io/github-actions/setup-cli@cli-actions - name:Authenticaterun:| echo "${{ secrets.LARABOOT_TOKEN }}" | laraboot login --user "${{ secrets.LARABOOT_USERNAME }}" -vvv - name:Buildid:builduses:laraboot-io/github-actions/commander@nextwith:# Replace this withbuildtask-name:mybuildtask - name:Login to Docker Hubuses:docker/login-action@v1with:username:${{ secrets.DOCKER_HUB_USERNAME }}password:${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name:Release into DockerHubenv:# or consume ${{ steps.build.outputs.buildtask_name }}BUILDTASK_NAME:mybuildtaskECR_REGISTRY:${{ secrets.DOCKER_HUB_USERNAME }}run:| # Use current branch as tag docker tag $BUILDTASK_NAME $ECR_REGISTRY/$BUILDTASK_NAME:${GITHUB_REF##*/} docker push $ECR_REGISTRY/$BUILDTASK_NAME:${GITHUB_REF##*/}
Commander will only build the task but it doesn't publish it.-