Skip to content

Commit 6c48721

Browse files
authored
Add CLA and Signed-off-by checks (#40)
Signed-off-by: Peter Sabaini <peter.sabaini@canonical.com>
1 parent 46652f6 commit 6c48721

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/commits.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Commits
2+
on:
3+
- pull_request
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
cla-check:
10+
permissions:
11+
pull-requests: read
12+
name: Canonical CLA signed
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- name: Check if CLA signed
16+
uses: canonical/has-signed-canonical-cla@v2
17+
18+
dco-check:
19+
permissions:
20+
pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR
21+
name: Signed-off-by (DCO)
22+
runs-on: ubuntu-20.04
23+
steps:
24+
- name: Get PR Commits
25+
id: 'get-pr-commits'
26+
uses: tim-actions/get-pr-commits@master
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Check that all commits are signed-off
31+
uses: tim-actions/dco@master
32+
with:
33+
commits: ${{ steps.get-pr-commits.outputs.commits }}

0 commit comments

Comments
 (0)