diff --git a/.github/workflows/release-container.yaml b/.github/workflows/release-container.yaml index 5d8909a..be95c61 100644 --- a/.github/workflows/release-container.yaml +++ b/.github/workflows/release-container.yaml @@ -7,13 +7,6 @@ on: jobs: release-container-image: - strategy: - matrix: - containers: - - file: Dockerfile - tags: | - simonkowallik/tmconfpy:latest - ghcr.io/simonkowallik/tmconfpy:latest runs-on: ubuntu-latest permissions: contents: read @@ -42,17 +35,33 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) + id: metadata + uses: docker/metadata-action@v5 + with: + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} + - name: Build and push uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64 - file: ${{ matrix.containers.file }} + file: Dockerfile push: true cache-from: type=gha cache-to: type=gha,mode=max - tags: ${{ matrix.containers.tags }} + tags: ${{ steps.metadata.outputs.tags }} + labels: ${{ steps.metadata.outputs.labels }} + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true + - name: Docker Hub Description uses: peter-evans/dockerhub-description@v4 with: