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

ci: notarize: Add --subject to statement creation #44

Merged
merged 3 commits into from
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading