Skip to content

Commit

Permalink
Change git checkout method for forks
Browse files Browse the repository at this point in the history
This should hopefully fix an issue with the checkout method failing on forks
  • Loading branch information
frankieroberto committed Dec 17, 2024
1 parent a1930e2 commit 96b1138
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/json-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ jobs:

steps:
- uses: actions/checkout@v4
# Check out the git repo using the 'head' ref, so that
# we can commit to the branch if needed - but only if
# this is not a fork
with:
ref: ${{ github.event.pull_request.head.ref }}
if: github.event.pull_request.head.repo.full_name == github.repository
- uses: actions/checkout@v4
# Checkout the default way if it is a fork
if: github.event.pull_request.head.repo.full_name != github.repository
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down

0 comments on commit 96b1138

Please sign in to comment.