# Builds and pushes the multi-arch MeterVault image on a vX.Y.Z tag (SDD ยง11). # Default registry is GHCR; change REGISTRY/IMAGE below (one place) to target the FinalFactory # registry (e.g. REGISTRY: git.finalfactory.de) and set the matching login secrets. name: docker-publish on: push: tags: ["v*"] workflow_dispatch: {} env: REGISTRY: ghcr.io IMAGE: ${{ github.repository }} # ghcr.io//metervault permissions: contents: read packages: write jobs: build-and-push: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Derive version id: ver run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - name: Log in to the registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v6 with: context: . file: deploy/Dockerfile platforms: linux/amd64,linux/arm64 push: true tags: | ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.ver.outputs.version }} ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest cache-from: type=gha cache-to: type=gha,mode=max