Add GitHub Actions workflow for container image #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| tags: | |
| - '4.*' | |
| pull_request: | |
| jobs: | |
| build: | |
| uses: docker/github-builder/.github/workflows/build.yml@v1 | |
| permissions: | |
| contents: read # to fetch the repository content | |
| id-token: write # for signing attestation(s) with GitHub OIDC Token | |
| packages: write # for pushing the container image | |
| with: | |
| output: image | |
| push: ${{ github.event_name != 'pull_request' }} | |
| platforms: linux/amd64 | |
| build-args: | | |
| DOCKER_METADATA_OUTPUT_VERSION | |
| branch=stable | |
| meta-images: | | |
| ghcr.io/tkcert/assemblyline-service-metadefender | |
| meta-tags: | | |
| type=pep440,pattern={{version}} | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| secrets: | |
| registry-auths: | | |
| - registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} |