[GH-ISSUE #2716] Is it possible to validate workflows with act, without running them? #1228

Closed
opened 2026-03-01 21:49:49 +03:00 by kerem · 5 comments
Owner

Originally created by @mm-chia on GitHub (Mar 27, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/2716

Act version

act version 0.2.75

Feature description

Hi there!

First of all, congrats for putting together this awesome tool!

I would like to be able to validate the workflows (for syntax errors) in CI/CD.
Would act allow this?
I checked act --help but I could not see any flag for validation or such.

thanks!!

Originally created by @mm-chia on GitHub (Mar 27, 2025). Original GitHub issue: https://github.com/nektos/act/issues/2716 ### Act version act version 0.2.75 ### Feature description Hi there! First of all, congrats for putting together this awesome tool! I would like to be able to validate the workflows (for syntax errors) in CI/CD. Would act allow this? I checked `act --help` but I could not see any flag for validation or such. thanks!!
kerem 2026-03-01 21:49:49 +03:00
Author
Owner

@panekj commented on GitHub (Mar 27, 2025):

I would like to be able to validate the workflows (for syntax errors) in CI/CD.
Would act allow this?

You can use dry run mode of act or use https://github.com/rhysd/actionlint

<!-- gh-comment-id:2757324034 --> @panekj commented on GitHub (Mar 27, 2025): > I would like to be able to validate the workflows (for syntax errors) in CI/CD. > Would act allow this? You can use dry run mode of act or use https://github.com/rhysd/actionlint
Author
Owner

@ChristopherHX commented on GitHub (Mar 27, 2025):

I think --list is better, than dryrun due to open bugs and concerning test coverage in act.

If you mean the basic schema validation I added last year.

<!-- gh-comment-id:2757859365 --> @ChristopherHX commented on GitHub (Mar 27, 2025): I think `--list` is better, than dryrun due to open bugs and concerning test coverage in act. If you mean the basic schema validation I added last year.
Author
Owner

@mm-chia commented on GitHub (Mar 27, 2025):

Thanks for your input!

I've tried act --list but the command lists the workflows, without doing any validation on them (or so it seems).
I broke the yaml format, I put wrong values for events.. but act is still happy with it :)
act --dryrun also ignores any issues with event names, and other things, it doesn't seem to be doing much validation either - it happily runs with broken schema :)

I need a tool that will validate the github workflows for syntax/schema, so we can catch any issues at pull request time.
Do you know if any official tool from Github, for this purpose? I've spent quite a bit of time searching, but I couldn't find one..

I did try actionlint, but it has some issues (false positives), so I can't really use it as it is now.. Their repository has over 100 issues opened, but I'm not sure how much activity on it ..
I also tried github-workflow-validator, but this one has a long standing issue with glob validation, so that's also a deal breaker :(

<!-- gh-comment-id:2758424417 --> @mm-chia commented on GitHub (Mar 27, 2025): Thanks for your input! I've tried `act --list` but the command lists the workflows, without doing any validation on them (or so it seems). I broke the yaml format, I put wrong values for events.. but act is still happy with it :) `act --dryrun` also ignores any issues with event names, and other things, it doesn't seem to be doing much validation either - it happily runs with broken schema :) I need a tool that will validate the github workflows for syntax/schema, so we can catch any issues at pull request time. Do you know if any official tool from Github, for this purpose? I've spent quite a bit of time searching, but I couldn't find one.. I did try [actionlint](https://github.com/rhysd/actionlint), but it has some issues (false positives), so I can't really use it as it is now.. Their repository has over 100 issues opened, but I'm not sure how much activity on it .. I also tried [github-workflow-validator](https://github.com/mpalmer/action-validator), but this one has a long standing issue with [glob validation](https://github.com/mpalmer/action-validator/issues/27), so that's also a deal breaker :(
Author
Owner

@ChristopherHX commented on GitHub (Mar 27, 2025):

I broke the yaml format, I put wrong values for events.. but act is still happy with it :)

To comply with the GitHub Action spec we cannot use the strict schema

If the previous v0.2.74 would report your change as error before execution, then I could create an --validate --strict flag that might do just what you want using the disabled strict validation

<!-- gh-comment-id:2758807396 --> @ChristopherHX commented on GitHub (Mar 27, 2025): > I broke the yaml format, I put wrong values for events.. but act is still happy with it :) To comply with the GitHub Action spec we cannot use the strict schema - Our source of the schema (The official GitHub Actions Extension) has errors and would reject valid workflows in strict mode re https://github.com/nektos/act/pull/2524 If the previous [v0.2.74](https://github.com/nektos/act/releases/tag/v0.2.74) would report your change as error before execution, then I could create an `--validate --strict` flag that might do just what you want using the disabled strict validation
Author
Owner

@mm-chia commented on GitHub (Mar 28, 2025):

Yes, that command will probably do the trick, if implemented.
Thanks for the great feedback!

<!-- gh-comment-id:2760340518 --> @mm-chia commented on GitHub (Mar 28, 2025): Yes, that command will probably do the trick, if implemented. Thanks for the great feedback!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1228
No description provided.