From 0a6493acd8da7c1a356b818017007359ae657631 Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Thu, 8 Jan 2026 11:41:58 -0500 Subject: [PATCH] refactor(ci): use reusable contributors workflow from .github repo --- .github/workflows/contributors.yml | 35 ++---------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml index 49af203..3d381f2 100644 --- a/.github/workflows/contributors.yml +++ b/.github/workflows/contributors.yml @@ -7,36 +7,5 @@ on: jobs: contributors: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.CONTRIBUTORS_TOKEN }} - - - name: Update contributors - env: - GH_TOKEN: ${{ secrets.CONTRIBUTORS_TOKEN }} - run: | - # Fetch contributors from GitHub API (exclude bots) - contributors=$(gh api repos/CodingWithCalvin/dtvem.cli/contributors --paginate --jq '.[] | select(.type != "Bot") | select(.login | test("\\[bot\\]$") | not) | "\"\(.login)\"/"') - - # Build the contributors section - contrib_section=" -

- $contributors -

- " - - # Update README between the markers - awk -v contrib="$contrib_section" ' - //{found=1; print contrib; next} - //{found=0; next} - !found{print} - ' README.md > README.tmp && mv README.tmp README.md - - - name: Commit and push - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add README.md - git diff --staged --quiet || (git commit -m "docs: update contributors [skip ci]" && git push) + uses: CodingWithCalvin/.github/.github/workflows/contributors.yml@main + secrets: inherit