Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .github/workflows/attach-release-assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ jobs:
release_attach_assets:
runs-on: ${{ inputs.runs-on }}
if: github.event_name == 'push' && format('refs/heads/{0}', github.event.repository.default_branch) == github.ref
# A job-level permissions block replaces the full token permission set.
# List every permission that this job needs.
permissions:
contents: write
id-token: write

steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pr-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ on:
jobs:
scan:
runs-on: ${{ inputs.runs-on }}
# A job-level permissions block replaces the full token permission set.
# List every permission that this job needs.
permissions:
contents: read
pull-requests: write
id-token: write

steps:
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,23 @@ This repository contains the following shareable workflows under `.github/workfl
* attach-release-assets - Attaches SBOM and other build artifacts to releases along with a manifest file.
* conventional-commit-release - Lints commit messages and PR titles to ensure compliance with [Conventional Commits](https://www.conventionalcommits.org); on default branch builds it will execute the [release-please action](https://github.com/google-github-actions/release-please-action) to generate Github releases & changelogs.
* pr-scan - Executes the [dependency-review-action](https://github.com/actions/dependency-review-action) to check for vulnerabilities and license compliance in pull request dependencies.

## Permissions

The `pr-scan` and `attach-release-assets` jobs request `id-token: write`. The calling job must grant it, or the run fails before it starts.

```yaml
jobs:
scan:
uses: circlefin/circle-public-github-workflows/.github/workflows/pr-scan.yaml@v1
permissions:
contents: read
pull-requests: write
id-token: write

release-sbom:
uses: circlefin/circle-public-github-workflows/.github/workflows/attach-release-assets.yaml@v1
permissions:
contents: write
id-token: write
```
Loading