mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #41] clean up changed .git/config user after run #23
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @maxheld83 on GitHub (Feb 21, 2019).
Original GitHub issue: https://github.com/nektos/act/issues/41
When
actruns with some git action in the root, it appears to set a newnektos/actuser in the.git/config.That makes a ton of sense.
However, it'd be nice if
actcould clean up after itself, and revert this change on success or failure, so that I don't muck up my git config.I think this "problem" only happens in the relatively rare situation where you're running some git actions directly in your root.
An example would be (as in my case) when I deploy to GitHub pages from the root: said action then
git inits stuff right in my repo root, locally, thus overwriting/amending my own.git/config.I just commited a bunch of stuff and was really surprised that I had somehow become
nektos/act😸.This software is phenomenal, thanks for the generous work @nektos!
(this is somewhat related to #28 I think?)
@maxheld83 commented on GitHub (Feb 21, 2019):
oh, and if someone else is so dense as myself as to do this to your commit history, here's how you can fix it: https://stackoverflow.com/questions/4981126/how-to-amend-several-commits-in-git-to-change-author.
Needs
git push --forceat the end.@nicolo-ribaudo commented on GitHub (Feb 22, 2019):
As a workaround, I'm doing
in actions so that I don't need to update the git config for the repo.
@cplee commented on GitHub (Feb 22, 2019):
Would #21 address this issue? In summary, allow act to run in a temp directory with a fresh checkout of the repo.
@maxheld83 commented on GitHub (Feb 22, 2019):
yeah I think it would @cplee because then whatever git commands need to be run inside actions, and whatever changes they would make to
.git/configwould be inside that temp dir.@cplee commented on GitHub (Feb 25, 2020):
As of
0.2.2, act no longer runs against a bind mount of local dir...instead a volume is created and workdir is copied into volume