Feat: Backend server split into components + tests + some other improvements #8
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: | |
| name: Check commit sign-off | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # needed so we can inspect commit history | |
| - name: Validate allowed sign-off emails | |
| run: | | |
| ALLOWED_EMAILS="${{ vars.ALLOWED_SIGNOFF_EMAILS }}" | |
| IFS=',' read -r -a ALLOWED_EMAILS_ARRAY <<< "$ALLOWED_EMAILS" | |
| for commit in $(git log origin/main..HEAD --pretty=format:"%H"); do | |
| SIGNOFF=$(git show -s --format='%b' "$commit" | grep -i 'Signed-off-by:' | tail -n1) | |
| EMAIL=$(echo "$SIGNOFF" | sed -E 's/.*<([^>]+)>.*/\1/') | |
| if [[ -z "$EMAIL" ]]; then | |
| echo "❌ Commit $commit has no Signed-off-by line" | |
| exit 1 | |
| fi | |
| if [[ ! " ${ALLOWED_EMAILS_ARRAY[@]} " =~ " ${EMAIL} " ]]; then | |
| echo "❌ Commit $commit has disallowed email: $EMAIL" | |
| exit 1 | |
| fi | |
| done | |
| shell: bash | |
| - name: Get PR commits | |
| id: get_commits | |
| uses: tim-actions/get-pr-commits@v1.1.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: DCO check | |
| uses: tim-actions/dco@v1.1.0 | |
| with: | |
| commits: ${{ steps.get_commits.outputs.commits }} |