diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7d73421c589..5d5ba62457b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -51,8 +51,10 @@ jobs: - name: Check PR description is signed off if: github.event_name == 'pull_request' + env: + PR_DESC: ${{ github.event.pull_request.body }} run: | - if ! echo "${{ github.event.pull_request.body }}" | grep -Pq '^Signed-off-by:\s*(?!Your Name|.*)'; then + if ! echo "$PR_DESC" | grep -Pq '^Signed-off-by:\s*(?!Your Name|.*)'; then echo "::error ::Pull request has not been signed off in the PR description with a \`Signed-off-by:\` line" exit 1 fi