Skip to content

Commit 87d3332

Browse files
authored
Merge pull request #35 from slsa-framework/single-push
Only run notes push step on legacy versions
2 parents 6310589 + c46033d commit 87d3332

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

slsa_with_provenance/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ runs:
175175
cat ${{ github.workspace }}/metadata/signed_bundle.intoto.jsonl >> $GITHUB_STEP_SUMMARY
176176
shell: bash
177177

178+
# Legacy note storage: only runs when sourcetool did NOT push the note
179+
# itself (i.e. when the --push=note flag was not passed). Newer sourcetool
180+
# versions store the git note natively, so running this too would append a
181+
# duplicate attestation to refs/notes.
178182
- run: |
179183
git config user.name "${ACTOR}"
180184
git config user.email "${ACTOR}@users.noreply.github.com"
@@ -183,6 +187,7 @@ runs:
183187
git push origin "refs/notes/*"
184188
shell: bash
185189
name: store git note
190+
if: steps.configure_push.outputs.push_flag == ''
186191
env:
187192
ACTOR: ${{ github.actor }}
188193

0 commit comments

Comments
 (0)