Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Commit e896df6

Browse files
committed
chore: add checksum signing
sign checksum to verify it's integrity
1 parent e36da20 commit e896df6

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.github/workflows/test-iso.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ jobs:
1818
container:
1919
image: fedora:39
2020
options: "--privileged"
21+
env:
22+
GITHUB_HOST: ${{ github.server_url }}
23+
ACTIONS_ID_TOKEN_REQUEST_TOKEN: ${{ env.ACTIONS_ID_TOKEN_REQUEST_TOKEN }}
24+
ACTIONS_ID_TOKEN_REQUEST_URL: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL }}
2125
permissions:
2226
contents: read
2327
packages: write
28+
id-token: write
2429
strategy:
2530
fail-fast: false
2631
matrix:
@@ -55,4 +60,4 @@ jobs:
5560
run: exit 1
5661
- name: Exit
5762
shell: bash
58-
run: exit 0
63+
run: exit 0

action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ runs:
7474
ref: ${{ inputs.ACTION_REF }}
7575
submodules: recursive
7676

77+
- name: install cosign
78+
uses: sigstore/[email protected]
79+
7780
- name: Install dependencies
7881
shell: bash
7982
run: make install-deps
@@ -124,6 +127,18 @@ runs:
124127
sha256sum ${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.iso > ./end_iso/${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}-CHECKSUM
125128
mv ${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.iso end_iso/
126129
130+
- name: sign checksum
131+
shell: bash
132+
env:
133+
COSIGN_YES: "true"
134+
run: |
135+
cosign sign-blob ./end_iso/${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}-CHECKSUM --bundle ./end_iso/${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.bundle
136+
cosign verify-blob \
137+
./end_iso/${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}-CHECKSUM \
138+
--bundle ./end_iso/${{ inputs.IMAGE_NAME }}-${{ inputs.IMAGE_TAG || inputs.VERSION }}.bundle
139+
--certificate-identity-regexp 'https://github.com/${{ github.workflow_ref }}' \
140+
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com'
141+
127142
- name: Upload ISO as artifact
128143
uses: actions/upload-artifact@v4
129144
with:

0 commit comments

Comments
 (0)