Skip to content

Commit

Permalink
pr-ci: Check out submodules, needed if any of them changed
Browse files Browse the repository at this point in the history
When CI is run per commit, we first checkout the base branch and then we
merge in the "commit under review". Checking out the submodules from the
base is not going to be the correct ones. We need to check out the
submodules from the "commit under review".
  • Loading branch information
NickeZ committed Sep 2, 2024
1 parent d176d46 commit 35c6d81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ jobs:
- name: Clone the repo
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.pull_request.base.sha }}

Expand All @@ -70,6 +69,7 @@ jobs:
run: |
git fetch origin ${{ matrix.commit }} ${{ github.event.pull_request.merge_commit_sha }}
git merge --no-ff --no-edit ${{ matrix.commit }}
git submodule update --init --recursive
git log -1 --format="Head %H, Parents %P"
# Since the workflow definition is taken from the pull request merge commit, we need to
# get the .ci scripts from there as well.
Expand Down

0 comments on commit 35c6d81

Please sign in to comment.