Files
toon/.github/workflows/pr-title.yml
Okinea Dev aaef97a1ab ci: use slim Ubuntu runners (#256)
It will be more environmentally friendly and cheaper (at least for GitHub, because it's a public project and GitHub pays for it, not you)

GitHub blog post about new 1 vCPU runners: https://github.blog/changelog/2025-10-28-1-vcpu-linux-runner-now-available-in-github-actions-in-public-preview

Pricing (tl;dr: $0.002/min): https://docs.github.com/en/billing/reference/actions-runner-pricing

GitHub-hosted runners reference: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#standard-github-hosted-runners-for--private-repositories
2026-01-03 16:12:45 +01:00

37 lines
974 B
YAML

name: Check PR Title
on:
pull_request:
types: [opened, edited]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint-pr-title:
name: Lint PR title
runs-on: ubuntu-slim
if: ${{ (github.event.action == 'opened' || github.event.changes.title != null) && github.actor != 'renovate[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
persist-credentials: false
# Only fetch the config file from the repository
sparse-checkout-cone-mode: false
sparse-checkout: commitlint.config.ts
- name: Install dependencies
run: npm install -D @commitlint/cli @commitlint/config-conventional
- name: Validate PR title with commitlint
run: echo "$PR_TITLE" | npx commitlint
env:
PR_TITLE: ${{ github.event.pull_request.title }}