From edf4a2c20764e4884d98fb10a452b147c3a7e003 Mon Sep 17 00:00:00 2001 From: Ahmad Nawab Date: Wed, 5 Feb 2025 14:03:18 +0100 Subject: [PATCH] Explicitly request PR repo --- .github/workflows/build-hpc.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-hpc.yml b/.github/workflows/build-hpc.yml index 6a02c12..33aaef8 100644 --- a/.github/workflows/build-hpc.yml +++ b/.github/workflows/build-hpc.yml @@ -99,14 +99,15 @@ jobs: cmake --install build --prefix installation popd {% endfor %} - mkdir -p ${{ github.repository }} - pushd ${{ github.repository }} + set REPO=${{ github.event.pull_request.head.repo.full_name || github.repository }} + mkdir -p $REPO + pushd $REPO git init - git remote add origin ${{ github.server_url }}/${{ github.repository }} + git remote add origin ${{ github.server_url }}/$REPO git fetch origin ${{ github.sha }} git reset --hard FETCH_HEAD popd - cmake -G Ninja -S ${{ github.repository }} -B build \ + cmake -G Ninja -S $REPO -B build \ {% for name in dependencies %} {% set org, proj = name.split('/') %} -D{{proj}}_ROOT=$BASEDIR/{{name}}/installation \