mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #2392] actions/checkout fails with: ref: ${{ github.event.pull_request.head.sha }} with un-pushed commits #1099
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#1099
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 @brianjmurrell on GitHub (Jul 9, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2392
Bug report info
Command used with act
Describe issue
It appears that
actdoes some kind of override when it encounters:where it copies the local directory to where the workflow is being run:
This seems reasonable/
This override does not seem to happen though when one adds:
to the
actions/checkoutstep.While it seems reasonable not to invoke the override when one specifies a
ref:, I think when the ref is${{ github.event.pull_request.head.sha }}, one expects the job to act on the current directory the same as if theref:was not specified.Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response
@brianjmurrell commented on GitHub (Jul 17, 2024):
Any thoughts on this one? It's kind of defeating the purpose of
actto have to keep pushing every tiny change to GitHub.@cwrau commented on GitHub (Jul 24, 2024):
Similar thing is happening to us, we're trying to test CI without pushing, but
actfails with;fix/base-cluster/kube-janitor-imagebeing the local and not pushed branch I'm currently working on@barneyjackson commented on GitHub (Sep 5, 2024):
Looking at the same issue. Could the
--local-repositoryflag be helpful?Will report back any findings...
@nmarulo commented on GitHub (Sep 17, 2024):
I have the same problem.
@neumachen commented on GitHub (Sep 19, 2024):
I think the issue here is not in act by itself, but in the action/checkout action. I tried the --local-repository, but no dice. Unless we can redirect the clone from Github, to the local copy, or even skip it, I think that would fix this.
@robwhiteston commented on GitHub (Oct 10, 2024):
I am not sure if this is related to this bug, or if its something different, but I started using act today and I am seeing a weird failure related
actions/checkout@v4. My action file has 5 jobs in it. In the first job, we checkout the repo with actions/checkout like this:And that works just fine. But, in the second job, we checkout the repo again like this:
And this step fails with what looks like an authentication error related to cloning the "actions" repo:
I tried adding an
if: ${{ env.ACT }}line to the second job's checkout call to skip it, but, it seems like the step can't be skipped (or I am doing it wrong). Also, if I remove the 'with: ref...' clauses from the checkout step, I get the same error.@github-actions[bot] commented on GitHub (Apr 9, 2025):
Issue is stale and will be closed in 14 days unless there is new activity
@surgiie commented on GitHub (Oct 31, 2025):
I have hit very similar issues and tedious roadblocks due to unpushed commits, i opened a feature request ticket; https://github.com/nektos/act/issues/2392