diff --git a/.github/workflows/check-signed-off.yml b/.github/workflows/check-signed-off.yml index 0d2a917ccf..edf2c1cd4a 100644 --- a/.github/workflows/check-signed-off.yml +++ b/.github/workflows/check-signed-off.yml @@ -1,26 +1,14 @@ -name: Check Signed-off Commits - - -on: - pull_request: - types: - - synchronize - - opened - - reopened +name: Check signed commits in PR +on: pull_request jobs: - check-signed-off: + build: + name: Check signed commits in PR runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Check out code + uses: actions/checkout@v3 + + - name: Check signed commits in PR + uses: ./ - - 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