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

Commit

Permalink
ci: notarize: Add --subject to statement creation
Browse files Browse the repository at this point in the history
Related: #39

Signed-off-by: John Andersen <[email protected]>
  • Loading branch information
pdxjohnny authored Mar 26, 2024
1 parent fa1169d commit f0b39c4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/notarize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
description: 'Payload for claim'
default: ''
type: string
subject:
description: 'Subject for statement'
default: ''
type: string
workflow_call:
inputs:
scitt-url:
Expand All @@ -23,6 +27,10 @@ on:
payload:
description: 'Payload for claim'
type: string
subject:
description: 'Subject for statement'
default: ''
type: string

jobs:
notarize:
Expand All @@ -32,6 +40,7 @@ jobs:
env:
SCITT_URL: '${{ inputs.scitt-url || github.event.inputs.scitt-url }}'
PAYLOAD: '${{ inputs.payload || github.event.inputs.payload }}'
SUBJECT: '${{ inputs.subject || github.event.inputs.subject }}'
steps:
- name: Set defaults if env vars not set (as happens with on.push trigger)
run: |
Expand All @@ -41,6 +50,9 @@ jobs:
if [[ "x${PAYLOAD}" = "x" ]]; then
echo 'PAYLOAD={"key": "value"}' >> "${GITHUB_ENV}"
fi
if [[ "x${SUBJECT}" = "x" ]]; then
echo 'SUBJECT=subject:value' >> "${GITHUB_ENV}"
fi
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
Expand All @@ -62,7 +74,7 @@ jobs:
core.setOutput('token', await core.getIDToken(SCITT_URL));
- name: Create claim
run: |
scitt-emulator client create-claim --issuer did:web:example.org --content-type application/json --payload "${PAYLOAD}" --out claim.cose
scitt-emulator client create-claim --issuer did:web:example.org --subject "${SUBJECT}" --content-type application/json --payload "${PAYLOAD}" --out claim.cose
- name: Submit claim
env:
OIDC_TOKEN: '${{ steps.github-oidc.outputs.token }}'
Expand Down

0 comments on commit f0b39c4

Please sign in to comment.