name: Build and publish final image on: workflow_dispatch: push: tags: - 'v*.*.*' # Don't trigger if it's just a documentation update or a base image update paths-ignore: - '**.md' - '**.MD' - '**.yml' - 'docs/**' - 'LICENSE' - '.gitattributes' - '.gitignore' - 'requirements-docker.txt' - 'Dockerfile-base' jobs: build_and_publish_image: runs-on: ubuntu-latest steps: - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Docker meta id: meta uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository_owner }}/kcc - name: Build and push uses: docker/build-push-action@v6 with: platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: ${{ steps.meta.outputs.tags }} cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/kcc:final-cache cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/kcc:final-cache,mode=max