-
-
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: GitHub Actions says workflow is not valid because of ${{ !env.ACT }}
#720
Comments
Issue is stale and will be closed in 14 days unless there is new activity |
Keep |
That's a problem with GitHub and not Act. |
@catthehacker how do you suggest I fix it? Who should I contact? The docs for act include this line, but if it doesn't work with GitHub, that's a bug that should be fixed. |
act docs mention this but only for a step and it works on GitHub Actions, create issue on https://github.com/actions/runner to implement support for non-existing environment variables in job context of Lines 286 to 296 in dcbd583
|
If you ask me your statement in a job-if is a syntax violation and is correctly rejected by github, but act has no such validation. The env context is only evaluated in the runner not the server (I made my own server). name: Deploy
on:
push:
branches:
- release
# run for every pull request
pull_request: {}
jobs:
deploy:
name: Deploy
if: ${{ !github.event.act }} # skip during local actions testing
runs-on: ubuntu-latest
strategy:
matrix:
node: [12]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: Deploy
run: npx semantic-release@15 And use this {
"act": true
} Run act like
Hint: you can add / append |
I also just got the github error below.
|
Expected behaviour
GitHub Actions should not error regarding
${{ !env.ACT }}
Actual behaviour
GitHub Actions says workflow is not valid because of
${{ !env.ACT }}
Workflow and/or repository
Erroring Workflow
workflow
The text was updated successfully, but these errors were encountered: