File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 permissions :
1515 contents : read
1616 packages : write
17+ id-token : write
1718 steps :
1819 - name : Checkout
1920 uses : actions/checkout@v4
9192 username : ${{ github.actor }}
9293 password : ${{ github.token }}
9394 - name : Build and Push
95+ id : build
9496 uses : docker/build-push-action@v6
9597 with :
9698 context : .
@@ -106,3 +108,14 @@ jobs:
106108 TIMESCALE_TOOLKIT_VERSION=${{ steps.versions.outputs.timescale_toolkit }}
107109 cache-from : type=gha
108110 cache-to : type=gha,mode=max
111+ - name : Install Cosign
112+ if : github.ref_name == 'main'
113+ uses : sigstore/cosign-installer@v3
114+ - name : Sign image with Cosign
115+ if : github.ref_name == 'main'
116+ env :
117+ TAGS : ${{ steps.meta.outputs.tags }}
118+ DIGEST : ${{ steps.build.outputs.digest }}
119+ run : |
120+ set -euo pipefail
121+ printf '%s\n' "$TAGS" | xargs -I {} cosign sign --yes "{}@${DIGEST}"
You can’t perform that action at this time.
0 commit comments