|
| 1 | +# This is a basic workflow to help you get started with Actions |
| 2 | + |
| 3 | +name: CI |
| 4 | + |
| 5 | +# Controls when the action will run. Triggers the workflow on push or pull request |
| 6 | +# events but only for the master branch |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: [ master ] |
| 10 | + pull_request: |
| 11 | + branches: [ master ] |
| 12 | + |
| 13 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 14 | +jobs: |
| 15 | + # This workflow contains a single job called "build" |
| 16 | + build: |
| 17 | + # The type of runner that the job will run on |
| 18 | + runs-on: ubuntu-latest |
| 19 | + |
| 20 | + # Steps represent a sequence of tasks that will be executed as part of the job |
| 21 | + steps: |
| 22 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + |
| 25 | + # Runs a single command using the runners shell |
| 26 | + - name: Run a one-line script |
| 27 | + run: echo Hello, world! |
| 28 | + |
| 29 | + # Runs a set of commands using the runners shell |
| 30 | + - name: Run a multi-line script |
| 31 | + run: | |
| 32 | + echo Add other actions to build, |
| 33 | + echo test, and deploy your project. |
| 34 | + |
| 35 | + - name: Build and push Docker images |
| 36 | + |
| 37 | + with: |
| 38 | + # Username used to log in to a Docker registry. If not set then no login will occur |
| 39 | + username: # optional |
| 40 | + # Password or personal access token used to log in to a Docker registry. If not set then no login will occur |
| 41 | + password: # optional |
| 42 | + # Server address of Docker registry. If not set then will default to Docker Hub |
| 43 | + registry: # optional |
| 44 | + # Docker repository to tag the image with |
| 45 | + repository: |
| 46 | + # Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags |
| 47 | + tags: # optional |
| 48 | + # Automatically tags the built image with the git reference as per the readme |
| 49 | + tag_with_ref: # optional |
| 50 | + # Automatically tags the built image with the git short SHA as per the readme |
| 51 | + tag_with_sha: # optional |
| 52 | + # Path to the build context |
| 53 | + path: # optional, default is . |
| 54 | + # Path to the Dockerfile (Default is '{path}/Dockerfile') |
| 55 | + dockerfile: # optional |
| 56 | + # Sets the target stage to build |
| 57 | + target: # optional |
| 58 | + # Always attempt to pull a newer version of the image |
| 59 | + always_pull: # optional |
| 60 | + # Comma-delimited list of build-time variables |
| 61 | + build_args: # optional |
| 62 | + # Comma-delimited list of images to consider as cache sources |
| 63 | + cache_froms: # optional |
| 64 | + # Comma-delimited list of labels to add to the built image |
| 65 | + labels: # optional |
| 66 | + # Adds labels with git repository information to the built image |
| 67 | + add_git_labels: # optional |
| 68 | + # Whether to push the image |
| 69 | + push: # optional, default is true |
0 commit comments