From 100102e02b65a3cd11157fe5a360dc80e5d0c1fd Mon Sep 17 00:00:00 2001 From: Maxence Boutet <52334444+mboutet@users.noreply.github.com> Date: Sun, 12 Nov 2023 12:11:21 -0500 Subject: [PATCH 1/2] fix: Checkout commit from forked repo --- .github/workflows/samples.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index d4ad65494..9f6cf5379 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -44,7 +44,8 @@ jobs: - {bt: Release, os: macos-latest} env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}", - CMANY: ON, RYMLSHA: "${{github.event.pull_request.head.sha}}" } + CMANY: ON, RYMLSHA: "${{github.event.pull_request.head.sha}}", + PULL_REQUEST_HEAD_REPO: "${{github.event.pull_request.head.repo.full_name}}"} steps: - {name: checkout, uses: actions/checkout@v3, with: {submodules: recursive, fetch-depth: 0 } } # use fetch-depth to ensure all tags are fetched - {name: python3, uses: actions/setup-python@v4, with: {python-version: 3.7}} From 60aa4da818f620d52c1cb541af4b0b98b90a5313 Mon Sep 17 00:00:00 2001 From: Maxence Boutet <52334444+mboutet@users.noreply.github.com> Date: Sun, 12 Nov 2023 12:15:06 -0500 Subject: [PATCH 2/2] Update CMakeLists.txt --- samples/fetch_content/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/fetch_content/CMakeLists.txt b/samples/fetch_content/CMakeLists.txt index 2e313b26b..b67871424 100644 --- a/samples/fetch_content/CMakeLists.txt +++ b/samples/fetch_content/CMakeLists.txt @@ -14,7 +14,7 @@ message(STATUS "FetchContent from branch: ${RYML_BRANCH_NAME}") include(FetchContent) FetchContent_Declare(ryml - GIT_REPOSITORY https://github.com/biojppm/rapidyaml.git + GIT_REPOSITORY https://github.com/${PULL_REQUEST_HEAD_REPO:biojppm/rapidyaml}.git GIT_TAG ${RYML_BRANCH_NAME} GIT_SHALLOW FALSE # ensure submodules are checked out )