Merge pull request #22 from medizininformatik-initiative/release-v0.2.1 #41
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 | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
tags: | |
- '*.*.*' | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
test-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: false | |
file: docker/Dockerfile | |
tags: feasibility-monitoring:test | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prepare Version Info | |
id: prep | |
run: | | |
echo "mii=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT" | |
echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT" | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: docker/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
ghcr.io/${{ steps.prep.outputs.mii }}/feasibility-monitoring:latest | |
ghcr.io/${{ steps.prep.outputs.mii }}/feasibility-monitoring:${{ steps.prep.outputs.version }} |