]>
Commit | Line | Data |
---|---|---|
db98a412 SG |
1 | name: Commits |
2 | on: | |
3 | - pull_request | |
4 | ||
a4d9801f SG |
5 | permissions: |
6 | contents: read | |
7 | ||
db98a412 SG |
8 | jobs: |
9 | dco-check: | |
a4d9801f SG |
10 | permissions: |
11 | pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR | |
db98a412 | 12 | name: Signed-off-by (DCO) |
207b7d3d | 13 | runs-on: ubuntu-22.04 |
db98a412 SG |
14 | steps: |
15 | - name: Get PR Commits | |
16 | id: 'get-pr-commits' | |
17 | uses: tim-actions/get-pr-commits@master | |
18 | with: | |
19 | token: ${{ secrets.GITHUB_TOKEN }} | |
20 | ||
21 | - name: Check that all commits are signed-off | |
22 | uses: tim-actions/dco@master | |
23 | with: | |
24 | commits: ${{ steps.get-pr-commits.outputs.commits }} | |
4175587f SG |
25 | |
26 | target-branch: | |
27 | permissions: | |
28 | contents: none | |
29 | name: Branch target | |
207b7d3d | 30 | runs-on: ubuntu-22.04 |
4175587f SG |
31 | steps: |
32 | - name: Check branch target | |
33 | env: | |
34 | TARGET: ${{ github.event.pull_request.base.ref }} | |
35 | run: | | |
36 | set -x | |
d822113a | 37 | [ "${TARGET}" = "main" ] && exit 0 |
4175587f SG |
38 | |
39 | echo "Invalid branch target: ${TARGET}" | |
40 | exit 1 |