Skip to content

Commit 460a352

Browse files
Elured-codeclaude
andcommitted
fix: install git before checkout in fedora build-binaries job
The previous fix (git config safe.directory) addressed the wrong problem. The checkout step's own log revealed the real cause: fedora:latest ships with no git preinstalled, and git was only installed in a step that ran *after* actions/checkout. Without git in PATH, actions/checkout silently falls back to downloading a plain source tarball via the GitHub REST API instead of doing a real clone -- producing a directory with no .git at all, which is why scripts/compute_version.sh's `git rev-list --count HEAD` failed with "not a git repository". Moved the dnf install step (which includes git) to run before actions/checkout so a real git clone happens. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 5bf93c7 commit 460a352

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

‎.github/workflows/build-binaries.yml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,13 @@ jobs:
130130
container: fedora:latest
131131

132132
steps:
133-
- uses: actions/checkout@v4
134-
with:
135-
fetch-depth: 0
136-
133+
# fedora:latest ships with no git. actions/checkout needs git in PATH
134+
# to perform a real clone (fetch-depth: 0 requires full history for
135+
# scripts/compute_version.sh's `git rev-list --count HEAD`); without
136+
# it, checkout silently falls back to downloading a plain source
137+
# tarball via the GitHub REST API — no .git directory at all — so this
138+
# must run *before* actions/checkout, not after.
139+
#
137140
# actions/setup-python is unreliable in a Fedora container (toolcache
138141
# glibc mismatch). Install Python natively via dnf instead.
139142
# gcc/gcc-c++ are required if PyInstaller needs to compile its bootloader.
@@ -146,12 +149,9 @@ jobs:
146149
upx
147150
python3.11 -m ensurepip --upgrade
148151
149-
# actions/checkout runs as the runner's host UID; inside the container
150-
# git sees the checked-out workspace as owned by a different user and
151-
# refuses to treat it as a repository ("not a git repository (or any
152-
# parent up to mount point /)") unless explicitly marked safe.
153-
- name: Mark workspace as a safe git directory
154-
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
152+
- uses: actions/checkout@v4
153+
with:
154+
fetch-depth: 0
155155

156156
- uses: actions/cache@v4
157157
with:

0 commit comments

Comments
 (0)