Feat: Backend server split into components + tests + some other improvements #9
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: 2025 robot-visual-perception | |
| # | |
| # SPDX-License-Identifier: MIT | |
| name: DCO Check | |
| on: | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| check-signoff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { fetch-depth: 0 } | |
| - id: get_commits | |
| uses: tim-actions/get-pr-commits@v1.1.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Require at least one allowed email in each commit message | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| COMMITS='${{ steps.get_commits.outputs.commits }}' | |
| IFS=',' read -ra ALLOWED <<< "${{ vars.ALLOWED_SIGNOFF_EMAILS }}" | |
| # build grep patterns | |
| ARGS=() | |
| for e in "${ALLOWED[@]}"; do ARGS+=("-e" "$(echo "$e" | xargs)"); done | |
| for sha in $(echo "$COMMITS" | jq -r '.[]'); do | |
| if ! git show -s --format=%B "$sha" | grep -Fqi "${ARGS[@]}"; then | |
| echo "❌ $sha has no allowed email in commit message"; exit 1 | |
| fi | |
| echo "✅ $sha" | |
| done |