ci: Add linter to make sure all commits are DCO signed

Mentioned in the CONTRIBUTING.md as well.
Let's enforce it.

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
This commit is contained in:
Michael Vetter
2026-03-21 00:45:57 +01:00
parent 9407eb958d
commit beef714a30

View File

@@ -1,17 +1,34 @@
name: "Commits" name: "Lint"
on: on:
pull_request: pull_request:
branches: [master] branches: [master]
types: [opened, synchronize, reopened]
jobs: jobs:
lint: commitlint:
name: "Conventional Commits"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
# Applies to all commits # Fetch all history so commitlint can see the commits in the PR
fetch-depth: 0 fetch-depth: 0
- name: "Conventional Commits" - name: "Conventional Commits"
uses: wagoid/commitlint-github-action@v6 uses: wagoid/commitlint-github-action@v6
dco:
name: "DCO"
runs-on: ubuntu-latest
steps:
- name: "Get PR Commits"
id: "get-pr-commits"
uses: tim-actions/get-pr-commits@v1.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: "Check DCO"
uses: tim-actions/dco@v1.1.0
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}