Feature/automatic docker build #8
Workflow file for this run
This file contains 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: Build docker image | |
on: | |
# schedule: | |
# - cron: '0 1 * * *' # everyday at 1am | |
push: | |
branches: | |
- 'master' | |
- 'develop' | |
- 'feature/beamsel' | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
include: | |
# - distribution: distroless | |
- distribution: ubuntu | |
steps: | |
- | |
name: checkout source code | |
uses: actions/checkout@v2 | |
- | |
name: init git submodules | |
run: scripts/init_submodules.sh | |
- | |
name: set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- | |
name: set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- | |
name: log in to github container registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: define docker tags | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: | | |
ghcr.io/medicalinformatics/secureepilinker | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=pr | |
flavor: | | |
latest=auto | |
prefix=${{ matrix.distribution }}- | |
- | |
name: build docker image | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
file: Dockerfile.${{ matrix.distribution }} | |
labels: ${{ steps.meta.outputs.labels }} | |
tags: ${{ steps.meta.outputs.tags }} |