Feat: Backend server split into components + tests + some other improvements #11
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 } | |
| - name: Require at least one allowed email in each commit message | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| BASE="${GITHUB_BASE_REF:-main}" | |
| git fetch --no-tags origin "$BASE:refs/remotes/origin/$BASE" | |
| RANGE="$(git merge-base HEAD refs/remotes/origin/$BASE)..HEAD" | |
| IFS=',' read -ra ALLOWED <<< "${{ vars.ALLOWED_SIGNOFF_EMAILS }}" | |
| for sha in $(git rev-list "$RANGE"); do | |
| msg="$(git show -s --format=%B "$sha")" | |
| ok=0 | |
| for email in "${ALLOWED[@]}"; do | |
| e="$(echo "$email" | xargs)" # trim spaces | |
| if echo "$msg" | grep -Fqi "$e"; then ok=1; break; fi | |
| done | |
| if (( ! ok )); then | |
| echo "❌ $sha has no allowed email in commit message"; exit 1 | |
| fi | |
| echo "✅ $sha" | |
| done | |
| - name: DCO check | |
| uses: tim-actions/dco@v1.1.0 |