canact 0.1.1

Probe an LLM and return host policy: max tools, edit format, XML fallback, JSON repair
Documentation
name: DCO

on:
  pull_request:
    branches: [main]
  merge_group: {}
  workflow_dispatch: {}

concurrency:
  group: dco-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read

jobs:
  dco:
    name: DCO
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
      - uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2
        with:
          egress-policy: audit
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          fetch-depth: 0
          persist-credentials: false
      - name: Check DCO sign-off
        env:
          BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.sha }}
        run: |
          for sha in $(git rev-list "${BASE_SHA}"..HEAD); do
            parents=$(git log -1 --format='%P' "$sha")
            if [[ "$parents" == *" "* ]]; then
              continue
            fi
            author=$(git log -1 --format='%an' "$sha")
            if [[ "$author" == *"[bot]" ]]; then
              echo "Skipping bot commit $sha by $author"
              continue
            fi
            if ! git log -1 --format='%B' "$sha" | grep -qi '^Signed-off-by:'; then
              echo "::error::Commit $sha by $author is missing Signed-off-by"
              exit 1
            fi
          done
          echo "All commits have DCO sign-off"