Skip to content

Commit

Permalink
Expand scai-gen opts for better legibility
Browse files Browse the repository at this point in the history
Signed-off-by: Marcela Melara <[email protected]>
  • Loading branch information
marcelamelara committed Nov 2, 2023
1 parent 79b5a53 commit 4941a72
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/actions/scai-gen-assert/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ runs:

- name: Generate ResourceDescriptor for evidence
id: gen-rd
uses: ./.github/actions/scai-gen-rd
# change to v0.2 tag when released
uses: in-toto/scai-demos/.github/actions/scai-gen-rd@main
with:
name: "${{ inputs.evidence-file }}"
path: "${{ inputs.evidence-path }}"
Expand All @@ -54,6 +55,5 @@ runs:
id: scai-gen-assert
shell: bash
run: |
mkdir -p ${{ inputs.assertion-path }}
scai-gen assert -e ${{ steps.gen-rd.outputs.file-rd-name }} -o ${{ inputs.assertion-path }}/${{ inputs.assertion-name }} ${{ inputs.attribute}}
scai-gen assert --evidence ${{ steps.gen-rd.outputs.file-rd-name }} --out-file ${{ inputs.assertion-path }}/${{ inputs.assertion-name }} ${{ inputs.attribute}}
echo "assertion-name=${{ inputs.assertion-path }}/${{ inputs.assertion-name }}" >> "$GITHUB_OUTPUT"
6 changes: 2 additions & 4 deletions .github/actions/scai-gen-rd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ runs:
if: ${{ inputs.is-file == 'true' }}
shell: bash
run: |
mkdir -p ${{ inputs.rd-path }}
scai-gen rd file -n ${{ inputs.name }} -l ${{ inputs.location }} -t ${{ inputs.media-type }} -o ${{ inputs.rd-path }}/${{ inputs.rd-name }} ${{ inputs.path }}/${{ inputs.name }}
scai-gen rd file --name ${{ inputs.name }} --download-location ${{ inputs.location }} --media-type ${{ inputs.media-type }} --out-file ${{ inputs.rd-path }}/${{ inputs.rd-name }} ${{ inputs.path }}/${{ inputs.name }}
echo "rd-name=${{ inputs.rd-path }}/${{ inputs.rd-name }}" >> "$GITHUB_OUTPUT"
- name: Run scai-gen rd remote
id: scai-gen-rd-remote
if: ${{ inputs.is-file == 'false' }}
shell: bash
run: |
mkdir -p ${{ inputs.rd-path }}
scai-gen rd remote -n ${{ inputs.name }} -d ${{ inputs.digest }} -g ${{ inputs.hash-alg }} -o ${{ inputs.rd-path }}/${{ inputs.rd-name }} ${{ inputs.uri }}
scai-gen rd remote --name ${{ inputs.name }} --digest ${{ inputs.digest }} --hash-alg ${{ inputs.hash-alg }} --out-file ${{ inputs.rd-path }}/${{ inputs.rd-name }} ${{ inputs.uri }}
echo "rd-name=${{ inputs.rd-path }}/${{ inputs.rd-name }}" >> "$GITHUB_OUTPUT"
4 changes: 1 addition & 3 deletions .github/actions/scai-gen-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ runs:
id: scai-gen-report
shell: bash
run: |
mkdir -p ${{ inputs.report-path }}
scai-gen report -s ${{ inputs.subject }} -o ${{ inputs.report-path }}/${{ inputs.report-name }} ${{ inputs.attr-assertions }}
scai-gen report --subject ${{ inputs.subject }} --out-file ${{ inputs.report-path }}/${{ inputs.report-name }} --pretty-print ${{ inputs.attr-assertions }}
echo "report-name=${{ inputs.report-path }}/${{ inputs.report-name }}" >> "$GITHUB_OUTPUT"
ls ${{ inputs.report-path }}
- name: Upload the signed SCAI AttributeReport
id: upload-assert
Expand Down
3 changes: 1 addition & 2 deletions .github/actions/scai-gen-sigstore/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ runs:
id: sign
shell: bash
run: |
mkdir -p ${{ inputs.attestation-path }}
scai-gen sigstore -o ${{ inputs.attestation-path}}/${{ inputs.attestation-name }} ${{ inputs.statement-path }}/${{ inputs.statement-name }}
scai-gen sigstore --out-file ${{ inputs.attestation-path}}/${{ inputs.attestation-name }} ${{ inputs.statement-path }}/${{ inputs.statement-name }}
echo "attestation-name=${{ inputs.attestation-path }}/${{ inputs.attestation-name }}" >> "$GITHUB_OUTPUT"
- name: Save the signed in-toto Attestation
Expand Down

0 comments on commit 4941a72

Please sign in to comment.