I have a GitHub Actions workflow that I currently run on push, but I can also run it ad hoc and on a cron schedule.
Currently if I want to change the schedule I need to make a PR and push the change. Is it possible instead to set a GitHub variable in my repo that I can then access
for instance something like:
name: Playwright
on:
schedule:
- cron: ${{vars.CHRONTIMER}}
workflow_dispatch:
pull_request:
# Default types are "opened", "synchronize" and "reopened" - Here we only want to run
# when not "draft" and therefor we need to have "ready_for_review" as well.
types: [opened, synchronize, reopened, ready_for_review]
jobs:
playwright:
name: "Playwright - ${{ matrix.project }}"
Or does GitHub need to be able to read the schedule direct in the YAML file?
1