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

Commit 1a9922a

Browse files
authored
ci: notarize: Add --subject to statement creation (#44)
* ci: notarize: Add --subject to statement creation Related: #39 Signed-off-by: John Andersen <johnandersenpdx@gmail.com> * ci: notarize: on: pull request: Test against main PRs Related: #39 Signed-off-by: John Andersen <johnandersenpdx@gmail.com> * Revert "ci: notarize: on: pull request: Test against main PRs" Run actions/github-script@v6 Error: Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable at Function.<anonymous> (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:585:23) at Generator.next (<anonymous>) at /home/runner/work/_actions/actions/github-script/v6/dist/index.js:522:71 at new Promise (<anonymous>) at __webpack_modules__.8041.__awaiter (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:518:12) at Function.getIDToken (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:571:16) at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:421:46) at Generator.next (<anonymous>) at /home/runner/work/_actions/actions/github-script/v6/dist/index.js:133:71 at new Promise (<anonymous>) Error: Unhandled error: Error: Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable This reverts commit d4ea9ea. --------- Signed-off-by: John Andersen <johnandersenpdx@gmail.com>
1 parent b3b49ff commit 1a9922a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/notarize.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
description: 'Payload for claim'
1616
default: ''
1717
type: string
18+
subject:
19+
description: 'Subject for statement'
20+
default: ''
21+
type: string
1822
workflow_call:
1923
inputs:
2024
scitt-url:
@@ -23,6 +27,10 @@ on:
2327
payload:
2428
description: 'Payload for claim'
2529
type: string
30+
subject:
31+
description: 'Subject for statement'
32+
default: ''
33+
type: string
2634

2735
jobs:
2836
notarize:
@@ -32,6 +40,7 @@ jobs:
3240
env:
3341
SCITT_URL: '${{ inputs.scitt-url || github.event.inputs.scitt-url }}'
3442
PAYLOAD: '${{ inputs.payload || github.event.inputs.payload }}'
43+
SUBJECT: '${{ inputs.subject || github.event.inputs.subject }}'
3544
steps:
3645
- name: Set defaults if env vars not set (as happens with on.push trigger)
3746
run: |
@@ -41,6 +50,9 @@ jobs:
4150
if [[ "x${PAYLOAD}" = "x" ]]; then
4251
echo 'PAYLOAD={"key": "value"}' >> "${GITHUB_ENV}"
4352
fi
53+
if [[ "x${SUBJECT}" = "x" ]]; then
54+
echo 'SUBJECT=subject:value' >> "${GITHUB_ENV}"
55+
fi
4456
- uses: actions/checkout@v4
4557
- name: Set up Python 3.8
4658
uses: actions/setup-python@v4
@@ -62,7 +74,7 @@ jobs:
6274
core.setOutput('token', await core.getIDToken(SCITT_URL));
6375
- name: Create claim
6476
run: |
65-
scitt-emulator client create-claim --issuer did:web:example.org --content-type application/json --payload "${PAYLOAD}" --out claim.cose
77+
scitt-emulator client create-claim --issuer did:web:example.org --subject "${SUBJECT}" --content-type application/json --payload "${PAYLOAD}" --out claim.cose
6678
- name: Submit claim
6779
env:
6880
OIDC_TOKEN: '${{ steps.github-oidc.outputs.token }}'

0 commit comments

Comments
 (0)