name: Images # Baut die drei Images und schiebt sie in die GitHub Container Registry. # Dockge zieht sie beim Update, siehe docs/11-betrieb.md. on: push: branches: [main] tags: ['v*'] workflow_dispatch: env: REGISTRY: ghcr.io jobs: bauen: runs-on: ubuntu-latest permissions: contents: read packages: write strategy: fail-fast: false matrix: include: - dienst: web dockerfile: docker/web.Dockerfile - dienst: worker dockerfile: docker/worker.Dockerfile - dienst: pdf dockerfile: docker/pdf.Dockerfile steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/afis-${{ matrix.dienst }} tags: | type=ref,event=branch type=semver,pattern={{version}} type=sha,format=short type=raw,value=latest,enable={{is_default_branch}} - uses: docker/build-push-action@v6 with: context: . file: ${{ matrix.dockerfile }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha,scope=${{ matrix.dienst }} cache-to: type=gha,mode=max,scope=${{ matrix.dienst }}