Skip to content

Commit 87ef460

Browse files
committed
ci: Use github "checkout" action to pull from git repo
Instead of running `git fetch` in a separate script, we specify `fetch-depth: 0` in the github workflow.
1 parent d425ab4 commit 87ef460

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

.ci/run-container-ci

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ if [ -z "${WORKSPACE_DIR}" ]; then
4141
fi
4242

4343
TARGET_BRANCH="${2:-master}"
44-
45-
# Fetch origin/master so that we can diff when checking coding style.
46-
git remote set-branches --add origin ${TARGET_BRANCH}
47-
git fetch origin
48-
4944
TARGET_BRANCH=origin/${TARGET_BRANCH}
5045

5146
# The safe.directory config is so that git commands work. even though the repo folder mounted in

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
- name: Clone the repo
1515
uses: actions/checkout@v4
1616
with:
17+
fetch-depth: 0
18+
fetch-tags: true
1719
submodules: recursive
1820
- name: Pull CI container image
1921
run: ./.ci/run-container-ci pull

.github/workflows/pr-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
uses: actions/checkout@v4
1313
with:
1414
submodules: recursive
15+
fetch-depth: 0
1516

1617
- name: Pull container image
1718
run: ./.ci/run-container-ci pull

0 commit comments

Comments
 (0)