From 56892c8471a04a3d3034db3726d100a5a9fab324 Mon Sep 17 00:00:00 2001 From: e7d Date: Fri, 5 Apr 2024 12:08:27 +0200 Subject: [PATCH] feat(): fix GitHub actions metadata set --- .github/workflows/docker-image.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 717a487..e1a3213 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -45,7 +45,7 @@ jobs: with: images: | name=${{ vars.GHCR_IMAGE }} - name=${{ vars.DOCKERHUB_IMAGE }},enable=${{ github.event_name != 'pull_request' }} + name=${{ vars.DOCKERHUB_IMAGE }} labels: | org.opencontainers.image.title=docker-diskmark org.opencontainers.image.description=A disk benchmarking tool for Docker @@ -55,7 +55,7 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=edge,branch=$repo.default_branch - type=ref,event=pr + type=sha,prefix=,suffix=,format=short - name: Build and push Docker image uses: docker/build-push-action@v5 with: @@ -63,7 +63,10 @@ jobs: platforms: ${{ env.PLATFORMS }} cache-from: type=gha cache-to: type=gha - push: true + sbom: ${{ github.event_name != 'pull_request' }} + provenance: ${{ github.event_name != 'pull_request' }} + push: ${{ startsWith(github.ref, 'refs/tags/') }} + load: ${{ github.event_name == 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - name: Docker Scout