Skip to content

Commit

Permalink
Update the workflows to check out from forks correctly.
Browse files Browse the repository at this point in the history
Update based on [this response](actions/checkout#551 (comment)).
This may not work for private repos.
  • Loading branch information
oldwomanjosiah authored and RBusarow committed Jul 27, 2022
1 parent 05fe2bc commit adf0532
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

Expand Down Expand Up @@ -85,6 +86,7 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0

Expand Down Expand Up @@ -131,6 +133,7 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0

Expand Down Expand Up @@ -236,6 +239,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

Expand All @@ -259,6 +263,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

Expand All @@ -283,6 +288,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

Expand Down

0 comments on commit adf0532

Please sign in to comment.