mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #1218] The env variables for step are not populated #672
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#672
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 @dmikov on GitHub (Jun 15, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1218
Bug report info
Command used with act
Describe issue
When running workflows on ACT the variables defined in the
envportion of the step are not populated, theenvportions of workflow and job seems to be working just fine. Below is the workflow and here is the outputs. First one from ACT and second one from GitHubYou can see that on ACT step-variable is missing.
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response
@github-actions[bot] commented on GitHub (Jul 16, 2022):
Issue is stale and will be closed in 14 days unless there is new activity
@alex-savchuk commented on GitHub (Sep 8, 2022):
Cant reproduce with master - all vars are shown:
[Nektos Act Bug Env/read-all] [DEBUG] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache CI:true DEBIAN_FRONTEND:noninteractive DEPLOYMENT_BASEPATH:/opt/runner GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:workflow_dispatch GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:read-all GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/step-env-support GITHUB_REF_NAME:step-env-support GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:alex-savchuk/act GITHUB_REPOSITORY_OWNER:alex-savchuk GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:b514649c3da64a1be92b8e22b50e296a07d759f6 GITHUB_TOKEN: GITHUB_WORKFLOW:Nektos Act Bug Env GITHUB_WORKSPACE:/mnt/d/Sources/act IMAGE_OS:ubuntu20 ImageOS:ubuntu20 JOB_LEVEL:job-level-variable LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/16.17.0/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache STEP_LEVEL:step-level-variable USER:root WORKFLOW_LEVEL:workflow-level-variable][Nektos Act Bug Env/read-all] [DEBUG] expression 'echo "${{ env.WORKFLOW_LEVEL }}" echo "${{ env.JOB_LEVEL }}" echo "${{ env.STEP_LEVEL }}" ' rewritten to 'format('echo "{0}" echo "{1}" echo "{2}" ', env.WORKFLOW_LEVEL, env.JOB_LEVEL, env.STEP_LEVEL)'[Nektos Act Bug Env/read-all] [DEBUG] expression 'format('echo "{0}" echo "{1}" echo "{2}" ', env.WORKFLOW_LEVEL, env.JOB_LEVEL, env.STEP_LEVEL)' evaluated to '%!t(string=echo "workflow-level-variable" echo "job-level-variable" echo "step-level-variable" )'So, maybe it's fixed or my env somehow affect it.
P.S. in provided log I see that env vars are set:
[Nektos Act Bug Env/read-all] setupEnv => map[... JOB_LEVEL:job-level-variable ... STEP_LEVEL:step-level-variable ... WORKFLOW_LEVEL:workflow-level-variable]but step's one is not applied during run evaluating.
@jsoref commented on GitHub (Jul 10, 2023):
Not sure where the problem was, but the fix is somewhere in: https://github.com/nektos/act/releases/tag/v0.2.27
broken in 0.2.26
fixed in 0.2.27
go#1551