4444 uses : docker/metadata-action@v5
4545 with :
4646 images : |
47- ${{ vars.DOCKERHUB_IMAGE }}
48- ${{ vars.GHCR_IMAGE }}
47+ name= ${{ vars.GHCR_IMAGE }}
48+ name= ${{ vars.DOCKERHUB_IMAGE }},enable=${{ github.event_name != 'pull_request' }}
4949 labels : |
5050 org.opencontainers.image.title=docker-diskmark
5151 org.opencontainers.image.description=A disk benchmarking tool for Docker
5555 type=semver,pattern={{major}}.{{minor}}
5656 type=semver,pattern={{major}}
5757 type=edge,branch=$repo.default_branch
58- type=sha,prefix=,suffix=,format=short
58+ type=ref,event=pr
5959 - name : Build and push Docker image
6060 uses : docker/build-push-action@v5
6161 with :
@@ -72,16 +72,16 @@ jobs:
7272 uses : docker/scout-action@v1
7373 with :
7474 command : cves,recommendations,compare
75- image : ${{ vars.DOCKERHUB_IMAGE }}:${{ env.SHA }}
76- to : ${{ vars.DOCKERHUB_IMAGE }}:latest
75+ image : ${{ steps.meta.outputs.tags }}
76+ to : ${{ vars.GHCR_IMAGE }}:latest
7777 ignore-base : true
7878 ignore-unchanged : true
7979 only-fixed : true
8080 # only-severities: critical,high
8181 write-comment : true
8282 github-token : ${{ secrets.GITHUB_TOKEN }}
8383 - name : Update repo description
84- if : github.ref == 'refs/heads/main'
84+ if : ${{ github.ref == 'refs/heads/main' }}
8585 uses : peter-evans/dockerhub-description@v4
8686 with :
8787 username : ${{ secrets.DOCKERHUB_USERNAME }}
0 commit comments