Skip to content

Commit 930f941

Browse files
committed
Explicitly request PR repo
1 parent 6768fdb commit 930f941

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/build-hpc.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,16 @@ jobs:
9999
cmake --install build --prefix installation
100100
popd
101101
{% endfor %}
102-
mkdir -p ${{ github.repository }}
103-
pushd ${{ github.repository }}
102+
REPO=${{ github.event.pull_request.head.repo.full_name || github.repository }}
103+
SHA=${{ github.event.pull_request.head.sha || github.sha }}
104+
mkdir -p $REPO
105+
pushd $REPO
104106
git init
105-
git remote add origin ${{ github.server_url }}/${{ github.repository }}
106-
git fetch origin ${{ github.sha }}
107+
git remote add origin ${{ github.server_url }}/$REPO
108+
git fetch origin $SHA
107109
git reset --hard FETCH_HEAD
108110
popd
109-
cmake -G Ninja -S ${{ github.repository }} -B build \
111+
cmake -G Ninja -S $REPO -B build \
110112
{% for name in dependencies %}
111113
{% set org, proj = name.split('/') %}
112114
-D{{proj}}_ROOT=$BASEDIR/{{name}}/installation \

0 commit comments

Comments
 (0)