Skip to content

Commit

Permalink
Fix tag-major workflow
Browse files Browse the repository at this point in the history
Github's workflow permissions are not as documented.

They say the job permissions override the workflow permisions. And yet, the workflow permissions (before being overridden) ACTUALLY MATTER. Because calling workflows must match the called workflow top-level permissions. Even if all those permissions will be overridden by the jobs. 😡
  • Loading branch information
jasonkarns authored May 26, 2024
1 parent c930477 commit ec0f560
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/tag-major.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ on:
push: { tags: "v*.*.*" }
workflow_dispatch:
workflow_call:

permissions: read-all
permissions: { contents: write }

jobs:
major:
if: github.ref_type == 'tag'
permissions: { contents: write }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit ec0f560

Please sign in to comment.