-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
pkg/runner: add support to replace GitHub's env #1197
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1197 +/- ##
==========================================
+ Coverage 57.50% 62.30% +4.79%
==========================================
Files 32 40 +8
Lines 4594 5332 +738
==========================================
+ Hits 2642 3322 +680
- Misses 1729 1744 +15
- Partials 223 266 +43
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
There might be use cases where users want to use GitHub's variables in the environment variables, which is a valid use case. This commits adds support for replacement of GitHub's env with GitHub's values. Signed-off-by: André Martins <aanm90@gmail.com>
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.
Thank you, I can confirm this works. Also with multiple expressions in a global env.
- name: print env.variable | ||
run: | | ||
echo ${{ env.variable }} | ||
exit ${{ (env.variable == 'nektos') && '0' || '1'}} |
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.
This test will fail in forks of act outside of the nektos org, maybe use a different context value like github.event_name
. I still approve this change as is.
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.
thank you!
There might be use cases where users want to use GitHub's variables in
the environment variables, which is a valid use case.
This commits adds support for replacement of GitHub's env with GitHub's
values.
Signed-off-by: André Martins aanm90@gmail.com
Fixes: #1195