Skip to content

Commit

Permalink
chore: set default permission for workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aabouzaid committed Sep 17, 2023
1 parent 62e552e commit 406d396
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ jobs:
build:
name: Build Artifacts
permissions:
contents: read
id-token: write
contents: write
packages: write
pull-requests: write
needs: ["lint"]
uses: ./.github/workflows/tpl-packaging.yml
secrets: inherit
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/go-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
name: Pre Release
runs-on: ubuntu-latest
permissions:
actions: write
id-token: write
contents: write
packages: write
pull-requests: write
steps:
- name: Run Release Please
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/tpl-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ on:
default: dist
type: string

# The permissions are inherited from the caller workflow.
permissions:
contents: read

jobs:
run:
name: Run GoReleaser
permissions:
id-token: write
contents: write
packages: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
Expand Down

0 comments on commit 406d396

Please sign in to comment.