Optimized checks
Simple checks that run with no runner and no billed minutes.
Simple checks like a PR title check or lint finish in seconds, but GitHub bills each job as a whole minute. An optimized check runs without a runner, so it uses no minutes.
As a job
Section titled “As a job”Put the check in its own job on runs-on: relayrunner:
on: pull_request: types: [opened, edited, synchronize, reopened]
jobs: pr-title: runs-on: relayrunner steps: - uses: relayrunner/actions/checks/pr-title@v1Keep optimized checks in a job of their own. A job that mixes in other steps fails with the reason.
Each check is also an ordinary action, so the same job works on ubuntu-latest or your own runner if you point it there.
The checks
Section titled “The checks”| Check | What it does |
|---|---|
checks/pr-title |
Fails unless the pull request title is a Conventional Commit, such as feat(api): add a check. types narrows the allowed types. |
checks/lint |
Runs linters on the commit and reports each problem on its file and line. tools picks the linters and paths limits which files count. |
From repo config
Section titled “From repo config”The PR title check and lint can also run on every pull request with no workflow at all. Lint from repo config needs the separate RelayRunner Checks GitHub App, which can read the repo’s code. Add relayrunner.yml to the repo’s root or .github/ folder:
checks: pr-title: true lint: [oxlint, typos]This works for public repos too. See Repo config.
See what they saved
Section titled “See what they saved”The Usage page counts each optimized check as a job that would have billed at least a minute on ubuntu-latest. See Usage and savings.