Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Checkout commit from forked repo #393

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion samples/fetch_content/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super familiar with Make's syntax, so feel free to edit. I want to use PULL_REQUEST_HEAD_REPO and fallback to biojppm/rapidyaml if PULL_REQUEST_HEAD_REPO is not set.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GIT_TAG ${RYML_BRANCH_NAME}
GIT_SHALLOW FALSE # ensure submodules are checked out
)
Expand Down
Loading