Skip to content

Commit

Permalink
Use GITHUB_TOKEN if GA_PAT secret is not set
Browse files Browse the repository at this point in the history
Useful in forks for example where the secret is usually not set.
  • Loading branch information
simPod authored and spawnia committed Jan 21, 2024
1 parent 8e748d9 commit 9dbc47a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/autoformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GA_PAT }}
token: ${{ secrets.GA_PAT == '' && secrets.GA_PAT || secrets.GITHUB_TOKEN }}

- uses: shivammathur/setup-php@v2
with:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GA_PAT }}
token: ${{ secrets.GA_PAT == '' && secrets.GA_PAT || secrets.GITHUB_TOKEN }}

- uses: shivammathur/setup-php@v2
with:
Expand Down

0 comments on commit 9dbc47a

Please sign in to comment.