Skip to content

Commit 88023b9

Browse files
fix(workflows): exclude archived repos from matrix
1 parent 22e6273 commit 88023b9

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/__issues-stale.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232
// create a GitHub strategy matrix
3333
let matrix = { "include": [] };
3434
for (const repo of repos) {
35-
matrix.include.push({ "repo": repo.name });
35+
if (!repo.archived) {
36+
matrix.include.push({ "repo": repo.name });
37+
}
3638
}
3739
return matrix
3840

.github/workflows/__update_license_years.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ jobs:
2828
// create a GitHub strategy matrix
2929
let matrix = { "include": [] };
3030
for (const repo of repos) {
31-
matrix.include.push({ "repo": repo.name });
31+
if (!repo.archived && !repo.fork) {
32+
matrix.include.push({ "repo": repo.name });
33+
}
3234
}
3335
return matrix
3436
@@ -39,16 +41,26 @@ jobs:
3941
strategy:
4042
fail-fast: false
4143
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
42-
max-parallel: 1 # run one at a time to attempt to avoid GitHub api rate limits
44+
max-parallel: 5 # run only a few at a time to attempt to avoid GitHub api rate limits
4345
steps:
4446
- name: Checkout
4547
uses: actions/checkout@v5
4648
with:
4749
repository: ${{ github.repository_owner }}/${{ matrix.repo }}
4850
fetch-depth: 0
49-
persist-credentials: false
51+
52+
- name: LICENSE exists
53+
id: license-exists
54+
shell: bash
55+
run: |
56+
license_exists=true
57+
if [ ! -f LICENSE ]; then
58+
license_exists=false
59+
fi
60+
echo "license_exists=${license_exists}" >> "${GITHUB_OUTPUT}"
5061
5162
- name: Update license year
63+
if: steps.license-exists.outputs.license_exists == 'true'
5264
uses: FantasticFiasco/action-update-license-year@v3
5365
with:
5466
commitAuthorEmail: ${{ secrets.GH_BOT_EMAIL }}

0 commit comments

Comments
 (0)