-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of set-output commands in the workflows #969
Conversation
e3173d4
to
0bfbc04
Compare
Signed-off-by: Jirka Kremser <[email protected]>
0bfbc04
to
61c8023
Compare
Hi, can't this generate some kind of scope issues ? ENV exists once for whole workflow run while step.. points to property of concrete instance. Anyway, using env certainly simplifies the usage. |
@kuritka what do you mean by scope issues? I agree that the semantics is different here and previously it was better isolated in the step itself. I haven't tested the behavior, but I can imagine that it's appending key=value entries to some env file which is being sourced at the beginning of each subsequent step (it's not available for the step itself in which we do the thing). So I think the latter occurrences will override the previous ones, but I didn't test it. Anyway we do not do that nor are relying on such behavior AFAICT. One can also set the env vars explicitly for whole job but also for each step, in this case I have no idea about the precedence rules, it's not well documented either. For sharing the data between the jobs this will not work at all, it's designed to work under one job and for that use-case one has to use job outputs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@kuritka we're basically following GH standard recommendations here for deprecated output commands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@somaritane - thx I see. I read it in links @jkremser mentioned in description. I'm convinced that the change is right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Jirka Kremser <[email protected]>
1a9c02c
Fixes #965
as suggested here and here, the
echo "::set-output name=foo::${bar}"
should be replaced withecho foo=bar >> $GITHUB_ENV
and then read as normal env var in all subsequent steps in the same job.