name: Create and publish a Docker image on: push: tags: - '*' jobs: build-and-push-image: runs-on: ubuntu-latest permissions: contents: read packages: write steps: - name: Checkout uses: actions/checkout@v4 - name: Login to Github Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} 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: Downcase repo run: | echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}" - name: Build and push uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 push: true tags: | ghcr.io/${{ env.REPO }}:${{ github.ref_name }} ghcr.io/${{ env.REPO }}:latest provenance: false # Disable provenance to avoid unknown/unknown sbom: false # Disable sbom to avoid unknown/unknown