Skip to content

chore(deps)(deps): bump actions/labeler from 6 to 7 in the all-actions group #156

chore(deps)(deps): bump actions/labeler from 6 to 7 in the all-actions group

chore(deps)(deps): bump actions/labeler from 6 to 7 in the all-actions group #156

Workflow file for this run

name: DCO Check
on:
pull_request:
branches: [main, develop]
jobs:
dco-check:
name: Check DCO Sign-off
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Check for DCO sign-off
run: |
# Require all commits in the PR to be signed off
unsigned=$(git log --no-merges origin/${{ github.base_ref }}..HEAD --pretty=format:'%H %s' | while read hash subject; do
if ! git log -1 --pretty=format:'%B' "$hash" | grep -q '^Signed-off-by:'; then
echo "$hash"
fi
done)
if [ -n "$unsigned" ]; then
echo "The following commits are missing a DCO sign-off (Signed-off-by: Name <email> in the commit message):"
echo "$unsigned" | while read hash; do
echo " - $hash: $(git log -1 --pretty=format:'%s' "$hash")"
done
exit 1
fi
echo "All commits have a valid DCO sign-off."