Skip to content

Commit

Permalink
fix: test release-image permissions (#36)
Browse files Browse the repository at this point in the history
- [x] add permissions needed to each doc for each reusable workflow

Signed-off-by: jmeridth <[email protected]>
  • Loading branch information
jmeridth authored Jan 25, 2025
1 parent 90604e8 commit c180b53
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
release_image:
needs: release
permissions:
contents: write
discussions: write
contents: read
packages: write
pull-requests: read
id-token: write
attestations: write
uses: ./.github/workflows/release-image.yaml
with:
image-name: github/ospo-reusable-workflows
Expand Down
3 changes: 3 additions & 0 deletions docs/auto-labeler.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

```yaml
- uses: github/ospo-reusable-workflows/.github/workflows/auto-labeler.yml@main
permissions:
contents: write
pull-requests: write
with:
# The name of the configuration file to use, default is release-drafter.yml
# from the release-drafter/release-drafter GitHub Action
Expand Down
3 changes: 3 additions & 0 deletions docs/labeler.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

```yaml
- uses: github/ospo-reusable-workflows/.github/workflows/labeler.yml@main
permissions:
contents: read
pull-requests: write
with:
# The name of the configuration file to use, default is labeler.yml
# from the actions/labeler GitHub Action
Expand Down
4 changes: 4 additions & 0 deletions docs/pr-title.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

```yaml
- uses: github/ospo-reusable-workflows/.github/workflows/pr-title.yml@main
permissions:
contents: read
pull-requests: read
statuses: write
with:
# Configure which types are allowed (newline-delimited).
# From: https://github.com/commitizen/conventional-commit-types/blob/master/index.json
Expand Down
3 changes: 3 additions & 0 deletions docs/release-discussion.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

```yaml
- uses: github/ospo-reusable-workflows/.github/workflows/release.yml@main
permissions:
contents: read
discussions: write
with:
# Full tag of the image, usually the version (v1.0.0)
full-tag: v1.0.0
Expand Down
5 changes: 5 additions & 0 deletions docs/release-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

```yaml
- uses: github/ospo-reusable-workflows/.github/workflows/release.yml@main
permissions:
contents: read
packages: write
id-token: write
attestations: write
with:
# Image name, usually owner/repository (github/ospo-reusable-workflows)
image-name: ${{ github.repository }}
Expand Down
3 changes: 3 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

```yaml
- uses: github/ospo-reusable-workflows/.github/workflows/release.yml@main
permissions:
contents: write
pull-requests: read
with:
# Boolean flag whether to publish the release, default is true
publish: true
Expand Down

0 comments on commit c180b53

Please sign in to comment.