Skip to content

Commit 9dbc47a

Browse files
simPodspawnia
authored andcommitted
Use GITHUB_TOKEN if GA_PAT secret is not set
Useful in forks for example where the secret is usually not set.
1 parent 8e748d9 commit 9dbc47a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/autoformat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- uses: actions/checkout@v4
3232
with:
3333
ref: ${{ github.head_ref }}
34-
token: ${{ secrets.GA_PAT }}
34+
token: ${{ secrets.GA_PAT == '' && secrets.GA_PAT || secrets.GITHUB_TOKEN }}
3535

3636
- uses: shivammathur/setup-php@v2
3737
with:
@@ -59,7 +59,7 @@ jobs:
5959
- uses: actions/checkout@v4
6060
with:
6161
ref: ${{ github.head_ref }}
62-
token: ${{ secrets.GA_PAT }}
62+
token: ${{ secrets.GA_PAT == '' && secrets.GA_PAT || secrets.GITHUB_TOKEN }}
6363

6464
- uses: shivammathur/setup-php@v2
6565
with:

0 commit comments

Comments
 (0)