Commit 8c094975 authored by Guillaume Abrioux's avatar Guillaume Abrioux
Browse files

workflows: add signed-off check



This adds a github workflow for checking the signed off line in commit
messages.
Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
parent d71db816
name: signed-off
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: "${GITHUB_WORKSPACE}/tests/scripts/workflows/signed-off.sh"
\ No newline at end of file
#!/bin/bash
set -x
if [[ "$(git log --oneline --no-merges origin/"${GITHUB_BASE_REF}"..HEAD | wc -l)" -ne "$(git log --no-merges origin/"${GITHUB_BASE_REF}"..HEAD | grep -c Signed-off-by)" ]]; then
echo "One or more commits is/are missing a Signed-off-by. Add it with 'git commit -s'."
exit 1
else
echo "Sign-off ok!"
fi
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment