-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SRE-1913 - Move from workflow to action
- Loading branch information
1 parent
7389560
commit de7196d
Showing
2 changed files
with
38 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Sign Package Collector Image | ||
description: | | ||
This action is responsible for signing the Docker image of the Package Collector | ||
and pushing the signature to the GitHub Container Registry (GHCR). | ||
inputs: | ||
image-name: | ||
description: 'The name of the image.' | ||
required: true | ||
image-digest: | ||
description: 'The digest of the image.' | ||
required: true | ||
PACKAGE_GITHUB_TOKEN: | ||
description: 'GitHub Token to authenticate and sign with' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Cosign | ||
uses: sigstore/cosign-installer@v3 | ||
- name: Log into registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.PACKAGE_GITHUB_TOKEN }} | ||
# Sign the Docker image (Using OIDC Token for "keyless signing") | ||
# https://github.com/sigstore/cosign-installer | ||
- name: Sign the images with GH OIDC Token | ||
shell: bash | ||
run: | | ||
cosign sign -d -y $IMAGE | ||
env: | ||
COSIGN_REPOSITORY: ghcr.io/${{ inputs.image-name }}-signatures | ||
IMAGE: ghcr.io/${{ inputs.image-name }}@${{ inputs.image-digest }} |
This file was deleted.
Oops, something went wrong.