mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #785] Issue: act does not update actions if version is taken from branch #490
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#490
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 @igagis on GitHub (Aug 27, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/785
System information
Expected behaviour
master:masterpoints to another commitResult: on step 4 the updated action is used
Actual behaviour
on step 4 the old action is used. Repeating the workflow run makes it to use the proper updated action.
Workflow and/or repository
Log
info
I faced this issue in context of github actions runner based on act, see corresponding issue there: https://github.com/ChristopherHX/github-act-runner/issues/49
@ChristopherHX commented on GitHub (Aug 27, 2021):
After looking more in the src of act...
The new branch ref is fetched, but
refs/heads/<branchname>still points to the last pulled branch revision.github.com/nektos/act@de44a505da/pkg/common/git.go (L337)Then pull failes, which seem to be ok. (or it actually doesn't failed due to force?)
Now this function does a checkout to the previous commit sha which is not uptodate after the branch pull.
github.com/nektos/act@de44a505da/pkg/common/git.go (L377-L395)calling the function again corrects this if the branch hasn't changed between the two calls. Better log the commit hash as it is the wrong one in this case.