File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 permissions :
2222 contents : read # required for actions/checkout
2323 packages : write # required for pushing to ghcr.io
24+ id-token : write # required for signing with cosign
2425 steps :
2526 - name : Check out the repo
2627 uses : actions/checkout@v4
@@ -38,11 +39,25 @@ jobs:
3839 username : ${{ github.actor }}
3940 password : ${{ secrets.GITHUB_TOKEN }}
4041
42+ - name : Install cosign
43+ uses : sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
44+ with :
45+ cosign-release : ' v2.2.4'
46+
4147 - name : Build and push Docker image
48+ id : build-and-push
4249 uses : docker/build-push-action@v5
4350 with :
4451 context : .
4552 push : true
4653 tags : |
4754 ghcr.io/sysdiglabs/sysdig-mcp-server:latest
4855 ghcr.io/sysdiglabs/sysdig-mcp-server:v${{ steps.extract_version.outputs.VERSION }}
56+
57+ - name : Sign the published Docker image
58+ env :
59+ TAGS : |
60+ ghcr.io/sysdiglabs/sysdig-mcp-server:latest
61+ ghcr.io/sysdiglabs/sysdig-mcp-server:v${{ steps.extract_version.outputs.VERSION }}
62+ DIGEST : ${{ steps.build-and-push.outputs.digest }}
63+ run : echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
You can’t perform that action at this time.
0 commit comments