@@ -24,7 +24,7 @@ List of checks:
2424- [ Webhook events validation] ( #check-webhook-events )
2525- [ Workflow dispatch event validation] ( #check-workflow-dispatch-events )
2626- [ Glob filter pattern syntax validation] ( #check-glob-pattern )
27- - [ CRON syntax check at ` schedule: ` ] ( #check-cron-syntax )
27+ - [ CRON syntax and IANA timezone string check at ` schedule: ` ] ( #check-cron-syntax-and-timezone )
2828- [ Runner labels] ( #check-runner-labels )
2929- [ Action format in ` uses: ` ] ( #check-action-format )
3030- [ Local action inputs validation at ` with: ` ] ( #check-local-action-inputs )
@@ -1564,7 +1564,7 @@ workflow. It checks:
15641564Most common mistake I have ever seen here is a misunderstanding that regular expression is available for filtering.
15651565This rule can catch the mistake so that users can notice their mistakes.
15661566
1567- <a id =" check-cron-syntax " ></a >
1567+ <a id =" check-cron-syntax-and-timezone " ></a >
15681568## CRON syntax check at ` schedule: `
15691569
15701570Example input:
@@ -1576,6 +1576,9 @@ on:
15761576 - cron : ' 0 */3 * *'
15771577 # ERROR: Interval of scheduled job is too small (job runs too frequently)
15781578 - cron : ' * */3 * * *'
1579+ # ERROR: Timezone is not a valid IANA timezone string
1580+ - cron : ' */5 * * * *'
1581+ timezone : ' Asia/Somewhere'
15791582
15801583jobs :
15811584 test :
@@ -1595,9 +1598,13 @@ test.yaml:6:13: scheduled job runs too frequently. it runs once per 60 seconds.
15951598 |
159615996 | - cron : ' * */3 * * *'
15971600 | ^~
1601+ test.yaml:9:17 : invalid timezone "Asia/Somewhere" in schedule event. it must be a valid IANA timezone name [events]
1602+ |
1603+ 9 | timezone : ' Asia/Somewhere'
1604+ | ^~~~~~~~~~~~~~~~
15981605` ` `
15991606
1600- [Playground](https://rhysd.github.io/actionlint/#eNpUjEEKAjEMRfdzir8bCLQK7nobpwYGKYk0yf0lFhezC/+9PJW2AdZPfsXgvIGCPlUa9jvo9gCB9utO/z3J9tbD8tHZfAVmiJU04wjxKOOZ7IfM+WPLyuAMaeB+Kmqt3wAAAP//hKgjxA= =)
1607+ [Playground](https://rhysd.github.io/actionlint/#eNpkjUHKwjAQRvc5xbcLBJL88OMmO8/gCdo4kEqbkUyC4OllrF2Iu+G94XtckwEkF7qOlfQGPHLjmmD/4OI/HJz95u7gvyaedn4YoC8bPblSgj3LMsULb/Qo1Mgac+NZtNlJ+t5uo4rXqTGP2odfJ3VvJZ3ukj6rXj8TKBdGCOEVAAD//8YnMuQ =)
16011608
16021609To trigger a workflow in specific interval, [scheduled event][schedule-event-doc] can be defined in [POSIX CRON syntax][cron-syntax].
16031610
@@ -1607,6 +1614,8 @@ actionlint checks the CRON syntax and frequency of running a job. [The official
16071614
16081615When the job is run more frequently than once every 5 minutes, actionlint reports it as an error.
16091616
1617+ actionlint also checks the ` timezone` configuration [is a valid IANA timezone string][schedule-item-doc].
1618+
16101619<a id="check-runner-labels"></a>
16111620# # Runner labels
16121621
@@ -3197,6 +3206,7 @@ test.yaml:0:0: could not parse as YAML: yaml: unknown anchor 'credentials' refer
31973206[webhook-doc]: https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#webhook-events
31983207[schedule-event-doc]: https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#scheduled-events
31993208[cron-syntax]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07
3209+ [schedule-item-doc]: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onschedule
32003210[gh-hosted-runner]: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
32013211[self-hosted-runner]: https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners
32023212[action-uses-doc]: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsuses
0 commit comments