-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Issue: if ${{ env.ACT }} not working on master #940
Comments
Maybe @ZauberNerd can add a proper test for this? name: if-env-act-test
on: push
jobs:
if_env_test:
name: Test if env.ACT matching
runs-on: ubuntu-latest
steps:
# Should RUN, since we are running in act
- name: Positive env.ACT match
if: ${{ env.ACT }}
shell: bash
run: |
echo "This workflow is run using act, continue!"
echo "ACT: $ACT"
exit 0
# Should SKIP, since we are running in act
- name: Negative env.ACT match
if: ${{ !env.ACT }}
shell: bash
run: |
echo "This should be skipped since this workflow is run using act, fail!"
echo "ACT: $ACT"
exit 1 |
@ZauberNerd Well, the expression evaluator changes from PR #840 broke this and according to @ChristopherHX PR #908 fixes that issue, so maybe wise to have a test in there which prevents any further breaking of this when working on this feature? It sounds logical to me to have a test added to a PR which fixes a specific issue doesn't it? |
@BlackDex I added your testworkflow in a new PullRequest, since the bug was fixed. |
System information
act
:act
version: ed01f46 (also a few few commits earlier 9868e13 )Expected behaviour
Assuming https://github.com/nektos/act#skipping-steps is still current for
master
Steps with
if: ${{ !env.ACT }}
should be skipped.Steps with
if: ${{ env.ACT }}
should not be skipped.Actual behaviour
Steps with
if: ${{ env.ACT }}
are skipped.Steps with
if: ${{ !env.ACT }}
are not skipped.Workflow and/or repository
Steps to reproduce
act
from masterif: ${{ env.ACT }}
orif: ${{ !env.ACT }}
on v0.2.25act
outputThe text was updated successfully, but these errors were encountered: