@@ -6,12 +6,12 @@ name: Docker
66# documentation.
77
88on :
9- # schedule:
10- # - cron: '20 13 * * *'
9+ # schedule:
10+ # - cron: '20 13 * * *'
1111 push :
12- branches : ["master"]
12+ branches : [ "master" ]
1313 # Publish semver tags as releases.
14- tags : [" v*.*.*" ]
14+ tags : [ ' v*.*.*' ]
1515# pull_request:
1616# branches: [ "master" ]
1717
2121 # github.repository as <account>/<repo>
2222 IMAGE_NAME : ${{ github.repository }}
2323
24+
2425jobs :
2526 build :
27+
2628 runs-on : ubuntu-latest
2729 permissions :
2830 contents : read
@@ -39,19 +41,21 @@ jobs:
3941 # https://github.com/sigstore/cosign-installer
4042 - name : Install cosign
4143 if : github.event_name != 'pull_request'
42- uses : sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1
44+ uses : sigstore/cosign-installer@v3.3.0
4345 with :
44- cosign-release : " v2.1.1 "
46+ cosign-release : ' v2.2.2 ' # optional
4547
46- # Workaround: https://github.com/docker/build-push-action/issues/461
47- - name : Setup Docker buildx
48- uses : docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
48+ # Set up BuildKit Docker container builder to be able to build
49+ # multi-platform images and export cache
50+ # https://github.com/docker/setup-buildx-action
51+ - name : Set up Docker Buildx
52+ uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
4953
5054 # Login against a Docker registry except on PR
5155 # https://github.com/docker/login-action
5256 - name : Log into registry ${{ env.REGISTRY }}
5357 if : github.event_name != 'pull_request'
54- uses : docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
58+ uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
5559 with :
5660 registry : ${{ env.REGISTRY }}
5761 username : ${{ github.actor }}
@@ -61,15 +65,15 @@ jobs:
6165 # https://github.com/docker/metadata-action
6266 - name : Extract Docker metadata
6367 id : meta
64- uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
68+ uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
6569 with :
6670 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6771
6872 # Build and push Docker image with Buildx (don't push on PR)
6973 # https://github.com/docker/build-push-action
7074 - name : Build and push Docker image
7175 id : build-and-push
72- uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
76+ uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
7377 with :
7478 context : .
7579 platforms : linux/amd64,linux/arm64
9296 DIGEST : ${{ steps.build-and-push.outputs.digest }}
9397 # This step uses the identity token to provision an ephemeral certificate
9498 # against the sigstore community Fulcio instance.
95- run : echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
99+ run : echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
0 commit comments