mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #970] Issue: default environment variables doesn't follow recent documents #569
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#569
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 @ethinx on GitHub (Jan 27, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/970
System information
Expected behaviour
There is a github env called
GITHUB_REF_NAMEActual behaviour
env.GITHUB_REF_NAMEis not setcheck https://github.com/nektos/act/blob/master/pkg/runner/run_context.go, it seems that the supported env in
actis not the same to the recent documentation: https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variablesWorkflow and/or repository
Get
${{ env.GITHUB_REF_NAME }}in stepsSteps to reproduce
Get
${{ env.GITHUB_REF_NAME }}in stepsactoutput@github-actions[bot] commented on GitHub (Feb 27, 2022):
Issue is stale and will be closed in 14 days unless there is new activity
@thiskevinwang commented on GitHub (Apr 24, 2022):
+1 — Would be nice to have
echo ${GITHUB_REF_NAME}behave similar toecho ${GITHUB_REF}Thanks for this great tool by the way 🙏
@ChristopherHX commented on GitHub (Apr 26, 2022):
On my low priority backlog
@thiskevinwang commented on GitHub (Apr 26, 2022):
@ChristopherHX I'd be happy to open a PR for this.
Is it pretty much adding an additional line here?
github.com/nektos/act@3f2469bf53/pkg/runner/run_context.go (L626)@ChristopherHX commented on GitHub (Apr 26, 2022):
This also needs to be added there
github.com/nektos/act@3f2469bf53/pkg/model/github_context.go (L20)Populated here based on github.ref without
refs/heads/orrefs/tags/.github.com/nektos/act@3f2469bf53/pkg/runner/run_context.go (L552)I would add it together with github.ref_type
I already do this in my act replacement backed by the official actions/runner:
github.com/ChristopherHX/runner.server@565a185a74/src/Runner.Server/Controllers/MessageController.cs (L939-L940)