Skip to content
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: schedule configuration not validated, allowing invalid syntax #545

Open
Stretch96 opened this issue Feb 24, 2021 · 4 comments
Open
Labels
kind/bug Something isn't working needs-work Extra attention is needed stale-exempt Exempt from stale

Comments

@Stretch96
Copy link

Stretch96 commented Feb 24, 2021

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

@Stretch96 Stretch96 added the kind/bug Something isn't working label Feb 24, 2021
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added the stale label Mar 27, 2021
@catthehacker catthehacker added stale-exempt Exempt from stale needs-work Extra attention is needed and removed stale labels Mar 30, 2021
@catthehacker catthehacker self-assigned this Aug 9, 2021
@ZauberNerd
Copy link
Contributor

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

@catthehacker catthehacker removed their assignment Feb 24, 2022
@catthehacker
Copy link
Member

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

@KnisterPeter
Copy link
Member

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working needs-work Extra attention is needed stale-exempt Exempt from stale
Projects
None yet
Development

No branches or pull requests

4 participants