fix(ci): correct git-cliff archive path in tar extraction #39
No reviewers
Labels
No Label
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sarman/tftsr-devops_investigation#39
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/git-cliff-changelog"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The
tarextraction in thechangelogCI job was failing with:The platform triple in the tarball filename does not carry through to the internal directory name. The archive always uses
git-cliff-{VERSION}/as the top-level directory regardless of platform.Before:
git-cliff-${CLIFF_VER}-x86_64-unknown-linux-musl/git-cliffAfter:
git-cliff-${CLIFF_VER}/git-cliffTest plan
auto-tag.yml;changelogjobInstall git-cliffstep passeschangelogjob completes — release body updated,CHANGELOG.mdcommitted and uploaded🤖 Automated PR Review:\n\n### 1) Summary
This PR corrects the path used during extraction of the
git-cliffbinary from a tarball in a CI workflow (auto-tag.yml). The change removes the architecture-specific suffix (-x86_64-unknown-linux-musl) from the inner tarball path, aligning the extraction path with the actual directory structure inside the released tarball.2) Bugs / Errors
✅ Correctness Fix Confirmed
The original path
"git-cliff-${CLIFF_VER}-x86_64-unknown-linux-musl/git-cliff"was incorrect for the officialgit-cliffrelease tarballs.🔍 Verification:
git-clifftarballs (e.g., v2.6.1) contain a top-level directory named exactlygit-cliff-${CLIFF_VER}(e.g.,git-cliff-2.6.1), not including the platform triplet in the directory name.tar -tzf): → So the correct relative path inside the tarball isgit-cliff-${CLIFF_VER}/git-cliff, notgit-cliff-${CLIFF_VER}-x86_64-unknown-linux-musl/git-cliff.✅ Impact:
Without this fix,
tar -xzwould fail to find the file, resulting in extraction failure and missinggit-cliffbinary — causing the subsequent changelog generation step to fail.3) Security Issues
⚠️ Low-Risk but Notable: Use of
curl | tarwithout integrity verificationgit-cliffreleases are signed (via GitHub’s release signing), this workflow does not validate GPG signatures or checksums.🔧 Recommendation (Enhancement):
Add checksum verification before extraction (e.g., using
sha256sumfrom the release assets):4) Best Practices
✅ Good: Use of
--strip-components=1/usr/local/bin.✅ Good: Targeting
/usr/local/bin⚠️ Minor: Hardcoded architecture (
x86_64)x86_64(e.g.,aarch64), it will fail.actions/setup-gooractions/setup-node-style actions if available, or detect arch dynamically (e.g., viauname -m).x86_64is currently the only supported architecture — so this is acceptable for now.✅ Corrected path aligns with upstream release format
✅ Final Verdict
The change is correct, minimal, and necessary.
Suggested commit message: