Skip to content

Commit 9e0204f

Browse files
committed
checkout repos with same ref as the calling workflow's ref
1 parent d4d03c1 commit 9e0204f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ jobs:
4444
with:
4545
persist-credentials: false
4646
repository: ${{ github.repository }}
47+
ref: ${{ github.sha }}
4748
path: project-repo
4849
- name: Checkout cpp-linter/.github (org) repo
4950
# needed for committed.toml config (org-specific)
5051
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5152
with:
5253
persist-credentials: false
5354
repository: cpp-linter/.github
55+
ref: ${{ github.job_workflow_sha }}
5456
path: org-repo
5557
- run: rustup update --no-self-update
5658
- name: Install cargo-binstall

0 commit comments

Comments
 (0)