Skip to content

Commit

Permalink
dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
pponnuvel committed Mar 3, 2024
1 parent 1d36491 commit b5cea23
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/check-signed-off.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
name: Check signed commits in PR
on: pull_request_target
name: Check Signed-off Commits


on:
pull_request:
types:
- synchronize
- opened
- reopened

jobs:
check-signed-commits:
name: Check signed commits in PR
check-signed-off:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- name: Check signed commits in PR
uses: 1Password/check-signed-commits-action@v1
- name: Checkout code
uses: actions/checkout@v3

- name: Check signed-off commits
run: |
for commit in $(git log --pretty=format:"%h" $(git merge-base main {{ github.ref }})..{{ github.ref }}); do
if ! git log --format=%B -n 1 $commit | grep -q "^Signed-off-by: "; then
echo "Commit $commit is not signed off."
exit 1
fi
done

0 comments on commit b5cea23

Please sign in to comment.