Skip to content

Commit

Permalink
ci: Restrict the attestations to only be created when running within …
Browse files Browse the repository at this point in the history
…the main repo
  • Loading branch information
nfelt14 committed May 21, 2024
1 parent 8cab808 commit b918a63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: hynek/build-and-inspect-python-package@v2.5.0
id: build-pkg
with:
attest-build-provenance-github: ${{ github.event.pull_request.head.repo.fork != 'true' && github.event.workflow_call.pull_request.head.repo.fork != 'true' }}
attest-build-provenance-github: ${{ github.event.pull_request.head.repo.full_name != github.repository && github.event.workflow_call.pull_request.head.repo.full_name != github.repository && github.actor != 'dependabot[bot]' }}
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sbom-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
format: spdx-json
output-file: ${{ github.event.repository.name }}-sbom.spdx.json
- uses: actions/attest-build-provenance@v1
if: ${{ github.event.pull_request.head.repo.fork != 'true' && github.event.workflow_call.pull_request.head.repo.fork != 'true' }}
if: ${{ github.event.pull_request.head.repo.full_name != github.repository && github.event.workflow_call.pull_request.head.repo.full_name != github.repository && github.actor != 'dependabot[bot]' }}
with:
subject-path: ${{ github.event.repository.name }}-sbom.spdx.json
- name: Scan SBOM
Expand Down

0 comments on commit b918a63

Please sign in to comment.