-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #761 from Mossaka/action-sign
release: add the missing checkout in action-sign
- Loading branch information
Showing
1 changed file
with
35 additions
and
32 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 |
---|---|---|
|
@@ -16,37 +16,40 @@ jobs: | |
name: Sign the binaries on ${{ inputs.os }} | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Setup cosign for signing | ||
uses: sigstore/[email protected] | ||
with: | ||
cosign-release: 'v2.2.2' | ||
- name: Sign the binaries | ||
run: | | ||
make dist-${{ inputs.runtime }} | ||
# Check if there's any files to archive as tar fails otherwise | ||
if stat dist/bin/* >/dev/null 2>&1; then | ||
echo "::notice::Signing the binary" | ||
cosign sign-blob --yes \ | ||
--output-signature containerd-shim-${{ inputs.runtime }}-v1.sig \ | ||
--output-certificate containerd-shim-${{ inputs.runtime }}-v1.pem \ | ||
--bundle containerd-shim-${{ inputs.runtime }}-v1.bundle \ | ||
dist/bin/containerd-shim-${{ inputs.runtime }}-v1 | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup cosign for signing | ||
uses: sigstore/[email protected] | ||
with: | ||
cosign-release: 'v2.2.2' | ||
- name: Sign the binaries | ||
run: | | ||
make dist-${{ inputs.runtime }} | ||
cosign sign-blob --yes \ | ||
--output-signature containerd-shim-${{ inputs.runtime }}d-v1.sig \ | ||
--output-certificate containerd-shim-${{ inputs.runtime }}d-v1.pem \ | ||
--bundle containerd-shim-${{ inputs.runtime }}d-v1.bundle \ | ||
dist/bin/containerd-shim-${{ inputs.runtime }}d-v1 | ||
# Check if there's any files to archive as tar fails otherwise | ||
if stat dist/bin/* >/dev/null 2>&1; then | ||
echo "::notice::Signing the binary" | ||
cosign sign-blob --yes \ | ||
--output-signature containerd-shim-${{ inputs.runtime }}-v1.sig \ | ||
--output-certificate containerd-shim-${{ inputs.runtime }}-v1.pem \ | ||
--bundle containerd-shim-${{ inputs.runtime }}-v1.bundle \ | ||
dist/bin/containerd-shim-${{ inputs.runtime }}-v1 | ||
cosign sign-blob --yes \ | ||
--output-signature containerd-shim-${{ inputs.runtime }}d-v1.sig \ | ||
--output-certificate containerd-shim-${{ inputs.runtime }}d-v1.pem \ | ||
--bundle containerd-shim-${{ inputs.runtime }}d-v1.bundle \ | ||
dist/bin/containerd-shim-${{ inputs.runtime }}d-v1 | ||
cosign sign-blob --yes \ | ||
--output-signature containerd-${{ inputs.runtime }}d.sig \ | ||
--output-certificate containerd-${{ inputs.runtime }}d.pem \ | ||
--bundle containerd-${{ inputs.runtime }}d.bundle \ | ||
dist/bin/containerd-${{ inputs.runtime }}d | ||
# Copy the certs to the dist/bin folder | ||
cp *.sig dist/bin/ | ||
cp *.pem dist/bin/ | ||
else | ||
echo "::warning::No files to sign" | ||
fi | ||
cosign sign-blob --yes \ | ||
--output-signature containerd-${{ inputs.runtime }}d.sig \ | ||
--output-certificate containerd-${{ inputs.runtime }}d.pem \ | ||
--bundle containerd-${{ inputs.runtime }}d.bundle \ | ||
dist/bin/containerd-${{ inputs.runtime }}d | ||
# Copy the certs to the dist/bin folder | ||
cp *.sig dist/bin/ | ||
cp *.pem dist/bin/ | ||
else | ||
echo "::warning::No files to sign" | ||
fi |