mirror of
https://github.com/nektos/act.git
synced 2026-04-26 17:35:49 +03:00
[GH-ISSUE #758] Issue: Only first step is able to set output variables #478
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#478
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 @domenix on GitHub (Jul 20, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/758
System information
actversion:c865a56(current commit onmasterat the time of submission)Expected behaviour
Output variables should be able to be defined in multiple steps under the same job
Actual behaviour
Currently, output variables can only be successfully defined in the first step inside a job (see official documentation for reference).
Workflow and/or repository
workflow
Steps to reproduce
Run:
act workflow_dispatch -W <path to the workflow file with content above>actoutputLog
Comments
May relate to issue 295 based on the comments at the end, but this one is a different issue as
needsnow work on the master branch, although not released yet.This can affect workflows where the first step pulls in an action, e.g. using the digitalocean/action-doctl@v2 as the first step in order to execute
doctlcommands that gets the IP address of a Droplet and sets it as the output in the second step will not be possible due to this issue.@thejpanganiban commented on GitHub (Aug 13, 2021):
Same experience on my end!
@BlackDex commented on GitHub (Aug 26, 2021):
Same here using Linux and
de44a50.@pcfighter commented on GitHub (Oct 14, 2021):
I've debugged it a bit, used workflow from issue content. When you check step value here:
https://github.com/nektos/act/blob/master/pkg/runner/step_context.go#L64
you will see that while still being on step
set_1runner is trying to interpolate values from other stepset_2, which sounds wrong.@BlackDex commented on GitHub (Oct 14, 2021):
I tested the fix from @ChristopherHX
github.com/ChristopherHX/act@fd9f40cdc0that seems to work perfectly.@chaoedu commented on GitHub (Oct 15, 2021):
So did I.
@BlackDex commented on GitHub (Nov 20, 2021):
@catthehacker any chance of this being fixed via the changes @ChristopherHX made being implemented into the this branch?
What is needed for this to be fixed/tested further?
@catthehacker commented on GitHub (Nov 20, 2021):
Pull request.
@BlackDex commented on GitHub (Nov 20, 2021):
@catthehacker ok, PR created.
I tested this on my own workflow files, and it seems to work.
The
make testisn't working for me on the master branch so i can't really test it using the go-tests locally for some reason on my PR either.