mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #720] Issue: GitHub Actions says workflow is not valid because of ${{ !env.ACT }} #456
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#456
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 @merlinstardust on GitHub (Jun 3, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/720
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
@github-actions[bot] commented on GitHub (Jul 4, 2021):
Issue is stale and will be closed in 14 days unless there is new activity
@merlinstardust commented on GitHub (Jul 4, 2021):
Keep
@catthehacker commented on GitHub (Jul 5, 2021):
That's a problem with GitHub and not Act.
@merlinstardust commented on GitHub (Jul 5, 2021):
@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.
@catthehacker commented on GitHub (Jul 5, 2021):
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
if:github.com/nektos/act@dcbd5837af/README.md (L286-L296)@ChristopherHX commented on GitHub (Jul 6, 2021):
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).
Please consider using the
githubcontext instead:And use this
event.jsonfile with act or Runner.Client otherwise the Job will run:Run act like
Hint: you can add / append
-e event.jsonas a line into./.actrc@diepes commented on GitHub (Sep 5, 2022):
I also just got the github error below.
Local with act it ran fine. I am trying to skip a job on local.
[Invalid workflow file: .github/workflows/ci.yml#L15](https://github.com/me/repo/actions/runs/2995855128/workflow) The workflow is not valid. .github/workflows/ci.yml (Line: 15, Col: 9): Unrecognized named-value: 'env'. Located at position 2 within expression: !env.ACT .github/workflows/ci.yml (Line: 39, Col: 9): Unrecognized named-value: 'env'. Located at position 2 within expression: !env.ACT