-
Notifications
You must be signed in to change notification settings - Fork 16
48 lines (43 loc) · 1.31 KB
/
commits.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Commits
on:
- pull_request
permissions:
contents: read
jobs:
cla-check:
runs-on: ubuntu-latest
permissions:
pull-requests: read
name: Canonical CLA signed
steps:
- name: Check if CLA signed
uses: canonical/has-signed-canonical-cla@v1
dco-check:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR
name: Signed-off-by (DCO)
steps:
- name: Get PR Commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check that all commits are signed-off
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
signed-commits-check:
runs-on: ubuntu-latest
name: Check signed commits in PR
permissions:
contents: read
# Note that the action authors suggest using `on: pull_request_target`
# and write permissions so that the action can comment on the PR.
#
# However, I found that doing that made the job not run on subsequent
# updates to the PR, which is not what we want.
pull-requests: read
steps:
- name: Check signed commits in PR
uses: 1Password/check-signed-commits-action@v1