Skip to content

Commit

Permalink
ci: pr checks for conventional commits and DCO
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis Asseman <[email protected]>
  • Loading branch information
aasseman committed Nov 4, 2022
1 parent 57e433d commit aaddd1b
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/conventional_commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
conventional-commits-check:
name: Check conventional commits
runs-on: ubuntu-latest
# Security!
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
permissions: read-all
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install commitizen
run: pip install commitizen
- name: commitizen check
run: cz check --rev-range ${{ github.event.pull_request.base.sha }}..HEAD
32 changes: 32 additions & 0 deletions .github/workflows/dco_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
# https://github.com/cncf/dcochecker
dco-check:
name: DCO signoff check
# Security!
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
permissions: read-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Check DCO
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DCO_CHECK_VERBOSE: '1'
# Comma-separated list of emails that should be ignored during DCO checks
# DCO_CHECK_EXCLUDE_EMAILS: ${{ inputs.exclude-emails }}
run: |
pip3 install -U dco-check
dco-check

0 comments on commit aaddd1b

Please sign in to comment.