Skip to content

Commit 4f87d38

Browse files
authored
ci: fix script download 404 on PRs from forks (#454)
Update GHA_REPOSITORY to use GitHub context variables. This ensures that scripts are fetched from the correct head repository and branch during Pull Request events, preventing fetching a wrong URL.
1 parent b8aa228 commit 4f87d38

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/macos-system-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
echo "GHA_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
3939
fi
4040
41-
echo "GHA_REPOSITORY=${{ github.repository}}" >> $GITHUB_ENV
41+
echo "GHA_REPOSITORY=${{ github.event.pull_request.head.repo.full_name || github.repository }}" >> $GITHUB_ENV
4242
4343
- name: Install BioDynaMo
4444
shell: zsh {0}

.github/workflows/ubuntu-system-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
echo "GHA_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
3535
fi
3636
37-
echo "GHA_REPOSITORY=${{ github.repository }}" >> $GITHUB_ENV
37+
echo "GHA_REPOSITORY=${{ github.event.pull_request.head.repo.full_name || github.repository }}" >> $GITHUB_ENV
3838
3939
- name: Set OSVERS
4040
run: |

0 commit comments

Comments
 (0)