Trigger Workflowsλ︎
GitHub workflows are triggered by events.
Events related to a GitHub workflow include
- pull request
- push
- workflow_dispatch (Manual run)
- Schedule (Cron)
Scheduled Version Check
Scheduled Version Check GitHub workflow uses the cron schedule to check for newer versions of Clojure libraries and GitHub actions
Cron scheduleλ︎
GitHub workflows can use cron:
to define a schedule as to when a workflow should run.
A POSIX Cron pattern is used to define the schedule
- Minute [0,59]
- Hour [0,23]
- Day of the month [1,31]
- Month of the year [1,12]
- Day of the week ([0,6] with 0=Sunday)
name: "Scheduled Version Check"
on:
schedule:
- cron: "0 4 * * *" # at 04:04:04 ever day
# - cron: "0 4 * * 5" # at 04:04:04 ever Friday
# - cron: "0 4 1 * *" # at 04:04:04 on first day of month
Scheduled version check uses cron schedule
Workflow Dispatchλ︎
Add workflow_dispatch:
without arguments to the on:
directive in a workflow configuration file to manually trigger the running of the workflow.
Visit GitHub.com > Actions > Workflow Name in the repository and select Run
Conditional on other workeflowλ︎
Run a workflow based on the outcome of running another GitHub workflow