Skip to content

Commit 59efed2

Browse files
masreplayclaude
andcommitted
ci: grant contents:read to publish jobs so checkout works on the private repo
An explicit permissions block replaces the default token scopes, so id-token:write alone dropped contents:read and actions/checkout failed with 'repository not found'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ab483c1 commit 59efed2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
if: startsWith(github.ref_name, 'navigation_devtools_shared-v')
2727
permissions:
2828
id-token: write # required for OIDC authentication to pub.dev
29+
contents: read # required for actions/checkout of this private repo
2930
uses: dart-lang/setup-dart/.github/workflows/publish.yml@main
3031
with:
3132
working-directory: packages/navigation_devtools_shared
@@ -34,6 +35,7 @@ jobs:
3435
if: startsWith(github.ref_name, 'navigation_devtools_test-v')
3536
permissions:
3637
id-token: write
38+
contents: read
3739
uses: dart-lang/setup-dart/.github/workflows/publish.yml@main
3840
with:
3941
working-directory: packages/navigation_devtools_test
@@ -44,6 +46,7 @@ jobs:
4446
if: startsWith(github.ref_name, 'navigation_devtools-v')
4547
permissions:
4648
id-token: write
49+
contents: read
4750
uses: dart-lang/setup-dart/.github/workflows/publish.yml@main
4851
with:
4952
working-directory: packages/navigation_devtools
@@ -52,6 +55,7 @@ jobs:
5255
if: startsWith(github.ref_name, 'go_router_devtools-v')
5356
permissions:
5457
id-token: write
58+
contents: read
5559
uses: dart-lang/setup-dart/.github/workflows/publish.yml@main
5660
with:
5761
working-directory: packages/go_router_devtools
@@ -60,6 +64,7 @@ jobs:
6064
if: startsWith(github.ref_name, 'auto_route_devtools-v')
6165
permissions:
6266
id-token: write
67+
contents: read
6368
uses: dart-lang/setup-dart/.github/workflows/publish.yml@main
6469
with:
6570
working-directory: packages/auto_route_devtools

0 commit comments

Comments
 (0)