diff options
author | Bernd Schubert <bernd@bsbernd.com> | 2025-01-01 22:53:38 +0100 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2025-01-01 23:34:08 +0100 |
commit | 94e269a8a5c50b6bb595261abb9d6cffe3380acb (patch) | |
tree | 092c166dffbc47e85947edd5f5e0d8773fab7f33 /.github/workflows | |
parent | e8bf8ad2e33c15e7da72842639c5ddade6dcf546 (diff) | |
download | libfuse-94e269a8a5c50b6bb595261abb9d6cffe3380acb.tar.gz |
Add a github action to check for "Signed-off-by"
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/dco.yml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml new file mode 100644 index 0000000..1a2121d --- /dev/null +++ b/.github/workflows/dco.yml @@ -0,0 +1,28 @@ +name: DCO Check (Developer Certificate of Origin) + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + check-dco: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 + - name: Check DCO + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + run: | + echo "Checking DCO for PR #${{ github.event.pull_request.number }}" + commits=$(gh pr view ${{ github.event.pull_request.number }} --json commits --jq '.commits[].oid') + for commit in $commits + do + if ! git log --format='%B' -n 1 $commit | grep -q "Signed-off-by:"; then + echo "Commit $commit is missing Signed-off-by line" + exit 1 + fi + done + echo "All commits have Signed-off-by lines" |