From cf729d8c8fc9570775c1590a64cefebf5aa09599 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:40:08 -0400 Subject: [PATCH] fix(workflows): exclude archived repos from matrix --- .github/workflows/__issues-stale.yml | 4 +++- .github/workflows/__update_license_years.yml | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/__issues-stale.yml b/.github/workflows/__issues-stale.yml index 4d55767d..6b6b5fe1 100644 --- a/.github/workflows/__issues-stale.yml +++ b/.github/workflows/__issues-stale.yml @@ -32,7 +32,9 @@ jobs: // create a GitHub strategy matrix let matrix = { "include": [] }; for (const repo of repos) { - matrix.include.push({ "repo": repo.name }); + if (!repo.archived) { + matrix.include.push({ "repo": repo.name }); + } } return matrix diff --git a/.github/workflows/__update_license_years.yml b/.github/workflows/__update_license_years.yml index 05219871..32062315 100644 --- a/.github/workflows/__update_license_years.yml +++ b/.github/workflows/__update_license_years.yml @@ -28,7 +28,9 @@ jobs: // create a GitHub strategy matrix let matrix = { "include": [] }; for (const repo of repos) { - matrix.include.push({ "repo": repo.name }); + if (!repo.archived && !repo.fork) { + matrix.include.push({ "repo": repo.name }); + } } return matrix @@ -39,16 +41,26 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} - max-parallel: 1 # run one at a time to attempt to avoid GitHub api rate limits + max-parallel: 5 # run only a few at a time to attempt to avoid GitHub api rate limits steps: - name: Checkout uses: actions/checkout@v6 with: repository: ${{ github.repository_owner }}/${{ matrix.repo }} fetch-depth: 0 - persist-credentials: false + + - name: LICENSE exists + id: license-exists + shell: bash + run: | + license_exists=true + if [ ! -f LICENSE ]; then + license_exists=false + fi + echo "license_exists=${license_exists}" >> "${GITHUB_OUTPUT}" - name: Update license year + if: steps.license-exists.outputs.license_exists == 'true' uses: FantasticFiasco/action-update-license-year@f180e962fa988db222d8f03ef4636750312d1b3d # v3.0.4 with: commitAuthorEmail: ${{ secrets.GH_BOT_EMAIL }}