feat(shrike-security): add Shrike action-governance partner recipe #260
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: DCO | |
| on: | |
| pull_request: | |
| branches: [main] | |
| types: [opened, edited, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| jobs: | |
| dco: | |
| name: Check DCO sign-off | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Check Dependabot DCO bypass | |
| id: dco-bypass | |
| env: | |
| USERNAME: ${{ github.event.pull_request.user.login }} | |
| run: | | |
| if [[ "$USERNAME" == "dependabot[bot]" || "$USERNAME" == "app/dependabot" ]]; then | |
| echo "bypass=true" >> "$GITHUB_OUTPUT" | |
| echo "Dependabot is exempt from the PR-description DCO declaration." | |
| else | |
| echo "bypass=false" >> "$GITHUB_OUTPUT" | |
| echo "The PR-description DCO declaration is required." | |
| fi | |
| - name: Check PR description for Signed-off-by | |
| if: ${{ steps.dco-bypass.outputs.bypass != 'true' }} | |
| env: | |
| PR_BODY: ${{ github.event.pull_request.body }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| normalized_body="$(printf '%s\n' "$PR_BODY" | tr -d '\r')" | |
| if ! printf '%s\n' "$normalized_body" \ | |
| | grep -Eq '^Signed-off-by:[[:space:]]+.+[[:space:]]+<[^<>]+>$'; then | |
| echo "::error::PR description must contain a DCO sign-off line." | |
| echo "::error::Expected format: Signed-off-by: Your Name <your-email@example.com>" | |
| exit 1 | |
| fi | |
| echo "PR description contains a DCO sign-off." |