Skip to content

Commit 51cee7a

Browse files
Merge pull request #71 from CERTCC/copilot/fix-github-actions-job-generate-sbom
fix(ci): generate-sbom – always checkout latest main, handle same-day reruns
2 parents 174368a + 08bec70 commit 51cee7a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/generate-sbom.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v4
29+
with:
30+
ref: main
2931

3032
- uses: actions/setup-node@v4
3133
with:
@@ -62,9 +64,9 @@ jobs:
6264
git checkout -b "$BRANCH"
6365
git add docs/sbom/
6466
git commit -m "chore: update SBOM inventory (${DATE})"
65-
git push origin "$BRANCH"
67+
git push --force-with-lease origin "$BRANCH"
6668
67-
gh pr create \
69+
gh pr view "$BRANCH" > /dev/null 2>&1 || gh pr create \
6870
--title "chore: update SBOM inventory (${DATE})" \
6971
--body "## SBOM Update
7072

0 commit comments

Comments
 (0)