From fd166b1844f6c0b9459455bb00297575a86c8056 Mon Sep 17 00:00:00 2001 From: "Florian Amette (F4K)" <50982737+florianamette@users.noreply.github.com> Date: Sun, 8 Nov 2026 17:42:32 -0500 Subject: [PATCH] ci: call the shared DCO workflow instead of a local copy The DCO sign-off check was duplicated in every public synthaea-lab repository. It now lives once, as a reusable workflow in synthaea-lab/.github; this file only wires it to pull_request with contents: read. The check itself is unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AuFi2XQ6ctHQ1eNQ4Fz8ud Signed-off-by: Florian Amette (F4K) <50982737+florianamette@users.noreply.github.com> --- .github/workflows/dco.yml | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml index 4356d4a..dc10314 100644 --- a/.github/workflows/dco.yml +++ b/.github/workflows/dco.yml @@ -1,9 +1,8 @@ name: DCO # Every commit in a pull request must carry a Developer Certificate of Origin sign-off -# (`Signed-off-by: Name `, added by `git commit -s`) whose email is the commit -# author's. CONTRIBUTING.md explains why (see "Licensing of your contribution"). -# Merge commits and bot commits (Dependabot) are exempt. +# (`git commit -s`). The check lives in one reusable workflow shared by every public +# synthaea-lab repository: https://github.com/synthaea-lab/.github/blob/main/.github/workflows/dco.yml on: pull_request: @@ -13,30 +12,4 @@ permissions: jobs: dco: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - fetch-depth: 0 - persist-credentials: false - - name: Every commit is signed off by its author - env: - BASE: ${{ github.event.pull_request.base.sha }} - HEAD: ${{ github.event.pull_request.head.sha }} - run: | - missing=0 - for c in $(git rev-list --no-merges "$BASE..$HEAD"); do - email=$(git log -1 --format=%ae "$c") - case "$email" in - *'[bot]@users.noreply.github.com') continue ;; - esac - if ! git log -1 --format=%B "$c" | grep -i '^Signed-off-by:' | grep -qiF "<$email>"; then - echo "::error::$(git log -1 --format='%h %s' "$c"): no 'Signed-off-by: ... <$email>' line" - missing=1 - fi - done - if [ "$missing" = 1 ]; then - echo "Sign off your commits: 'git commit -s' for new ones, 'git rebase --signoff $BASE' for these, then force-push." - exit 1 - fi - echo "All commits are signed off." + uses: synthaea-lab/.github/.github/workflows/dco.yml@main