fix: Use git reset --hard instead of pull and checkout for actions #1156
No reviewers
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
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
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/runner!1156
Loading…
Reference in a new issue
No description provided.
Delete branch "mfenniak/forgejo-runner:fix-git-update-cleanup"
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?
Primary credit to @drewcassidy for 99% of the work in #1096: Attempt to fix #1071
The error in question was happening in the git fetch step due to the working tree having updates (finding what is modifying the working tree is a puzzle for another day). This is fixed by passing Force=true to the fetch command (I am unclear on what this means. vanilla
git fetchdoesnt care about the working tree at all)Fixing this, it still failed due to the working tree. The current code is doing something silly with a pull and checkout, but a hard reset is probably the most robust solution.
cascading-pr updated at actions/setup-forgejo#760
fae08049adfe9a61a03acascading-pr updated at actions/setup-forgejo#760
WIP: fix: Use git reset --hard instead of pull and checkout for actionsto fix: Use git reset --hard instead of pull and checkout for actions@drewcassidy If it'd be possible for you to review this incremental change to your PR, I'd appreciate the additional eyes on it.