mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #1387] Multiline Environment variables isn't propagated by act between steps #731
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#731
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 @zukwung on GitHub (Oct 13, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1387
Bug report info
Command used with act
Describe issue
I noticed that the environment variable that the
google-github-actions/auth@v0action was not being propagated to thegoogle-github-actions/setup-gcloud@v0action. This is the recommended way by Google, and works in Github Actions.What I did notice was that Google's auth module uses exportVariable from actions/toolkit, which seems like they recently added an UUID to the multiline environment variables, which means that the way that act matches multiline environment variables in the
GITHUB_ENVfile no longer works.I tried playing around with the regex a little bit but I'm pretty bad at regex, otherwise I would submit a PR. What I noticed using regexr is the
(\w+)part of^([^<]+)<<(\w+)$doesn't match the UUID, which is the issue.Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
I also outputted the GITHUB_ENV file for reference, here is a snippet of the variables I need for gcloud setup to work.
@jbvirt commented on GitHub (Jan 14, 2023):
I am still noticing this issue on the latest release.
For example this step in a composite action:
In this step,
inputs.gpgKeyis a multi-line secret. It gets passed to a docker action like so:On GitHub, the startup script of the Dockerfile reads in the multiline secret as a single parameter. In
act, however, the secret is treated as many different parameters and split on spaces.The workaround for
actis to wrap the multiline secret in dingle/double quotes in the workflow file like so:"'${{ inputs.gpgKey }}'". Unfortunately, this will cause the secret to be wrapped in the quotes on GitHub, and it will need to be accounted for in any scripts using it as a parameter.