[GH-ISSUE #545] Issue: schedule configuration not validated, allowing invalid syntax #369

Open
opened 2026-03-01 21:42:43 +03:00 by kerem · 4 comments
Owner

Originally created by @Stretch96 on GitHub (Feb 24, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/545

Hello 👋

Found what may be either a bug, or might be an intentional

If act is to be used as a way to verify workflow syntax, then I think this might be a bug

act will succeed with invalid schedule syntax

Act version

$ act --version
act version 0.2.20

Expected behaviour

name: example
on:
  schedule:
    cron: '0 10 * * *'

act should fail because GitHub expects schedule to be a list

Running this on GitHub, the error is shown:

`\`schedule\` accepts a list of one or more maps with the \`cron\` key set`

Actual behaviour

act ignores schedule references by default as far as I can tell

Working workflow

on:
  schedule:
    - cron: '0 10 * * *'

Difference being the -, which makes schedule a list rather than map. Which is what GitHub expects

Originally created by @Stretch96 on GitHub (Feb 24, 2021). Original GitHub issue: https://github.com/nektos/act/issues/545 Hello 👋 Found what may be either a bug, or might be an intentional If `act` is to be used as a way to verify workflow syntax, then I think this might be a bug `act` will succeed with invalid `schedule` syntax ## Act version ```none $ act --version act version 0.2.20 ``` ## Expected behaviour ``` name: example on: schedule: cron: '0 10 * * *' ``` `act` should fail because GitHub expects `schedule` to be a list Running this on GitHub, the error is shown: ``` `\`schedule\` accepts a list of one or more maps with the \`cron\` key set` ``` ## Actual behaviour `act` ignores `schedule` references by default as far as I can tell ## Working workflow ``` on: schedule: - cron: '0 10 * * *' ``` Difference being the `-`, which makes `schedule` a list rather than map. Which is what GitHub expects
Author
Owner

@github-actions[bot] commented on GitHub (Mar 27, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:808605856 --> @github-actions[bot] commented on GitHub (Mar 27, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@ZauberNerd commented on GitHub (Feb 1, 2022):

Check out https://github.com/rhysd/actionlint to lint your workflow files.

<!-- gh-comment-id:1027162461 --> @ZauberNerd commented on GitHub (Feb 1, 2022): Check out https://github.com/rhysd/actionlint to lint your workflow files.
Author
Owner

@catthehacker commented on GitHub (Mar 25, 2022):

@nektos/act-maintainers do we want to implement that?

<!-- gh-comment-id:1079020801 --> @catthehacker commented on GitHub (Mar 25, 2022): @nektos/act-maintainers do we want to implement that?
Author
Owner

@KnisterPeter commented on GitHub (Mar 25, 2022):

Not sure, we are up to now, don't validate the workflow files. We talked about integrating actionlint for that.
I guess validating cron should belong in there.

<!-- gh-comment-id:1079028090 --> @KnisterPeter commented on GitHub (Mar 25, 2022): Not sure, we are up to now, don't validate the workflow files. We talked about integrating actionlint for that. I guess validating cron should belong in there.
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#369
No description provided.