Skip to content

Commit 1bb1478

Browse files
authored
Partially Harden CI (#5563)
1 parent 132df59 commit 1bb1478

8 files changed

Lines changed: 25 additions & 15 deletions

File tree

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
version: 2
22
updates:
33
- package-ecosystem: 'github-actions'
4+
cooldown:
5+
default-days: 14
46
directory: '/'
57
schedule:
68
interval: 'monthly'

.github/workflows/auto-update.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ jobs:
2626
contents: 'write'
2727
pull-requests: 'write'
2828
steps:
29-
- uses: 'actions/checkout@v6'
30-
- uses: 'actions/setup-node@v6'
29+
- uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
30+
with:
31+
persist-credentials: false
32+
- uses: 'actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f' # v6.3.0
3133
with:
3234
node-version: '20'
3335
cache: 'npm'
3436
cache-dependency-path: './package-lock.json'
3537
- run: 'npm clean-install'
3638
- run: 'node ./cli.js build-xregistry'
37-
- uses: peter-evans/create-pull-request@v8
39+
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1

.github/workflows/codeowners-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
permissions: 'write-all'
1212
steps:
13-
- uses: 'actions/checkout@v6'
13+
- uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
1414
- name: 'Run Codeowners check'
1515
uses: 'OSS-Docs-Tools/code-owner-self-merge@9f01f6d51b10a0e0a12300cdd614c9fa80787868'
1616
env:

.github/workflows/github-pages.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,18 @@ jobs:
2525
runs-on: 'ubuntu-latest'
2626
if: ${{ github.repository_owner == 'SchemaStore' }}
2727
steps:
28-
- uses: 'actions/checkout@v6'
29-
- uses: 'actions/setup-node@v6'
28+
- uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
29+
with:
30+
persist-credentials: false
31+
- uses: 'actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f' # v6.3.0
3032
with:
3133
node-version: '22'
3234
cache: 'npm'
3335
cache-dependency-path: './package-lock.json'
3436
- run: 'npm clean-install'
3537
- run: 'node ./cli.js build-website'
36-
- uses: 'actions/configure-pages@v5'
37-
- uses: 'actions/upload-pages-artifact@v4'
38+
- uses: 'actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b' # v5.0.0
39+
- uses: 'actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b' # v4.0.0
3840
with:
3941
path: './website'
4042

@@ -48,4 +50,4 @@ jobs:
4850
needs: 'build'
4951
steps:
5052
- id: 'deployment'
51-
uses: 'actions/deploy-pages@v4'
53+
uses: 'actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e' # v4.0.5

.github/workflows/label-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
if: github.repository == 'SchemaStore/schemastore'
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/labeler@v6
10+
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
1111
with:
1212
repo-token: '${{ secrets.GITHUB_TOKEN }}'
1313
sync-labels: true

.github/workflows/pre-commit-checks.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ jobs:
88
name: Run pre-commit checks
99
steps:
1010
- name: Checkout the repository
11-
uses: actions/checkout@v6
11+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
12+
with:
13+
persist-credentials: false
1214

1315
# Enablement of https://pre-commit.ci is desirable as it also
1416
# enable auto-fixes for formatting violations. Still we still want to run
1517
# our own GitHub action, just in case the external service becomes
1618
# unavailable.
17-
- uses: actions/setup-python@v6
19+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1820
with:
1921
python-version: '3.11'
2022
- name: Install pre-commit

.github/workflows/stale-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
if: github.repository_owner == 'SchemaStore'
1313
steps:
14-
- uses: actions/stale@v10
14+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
1515
with:
1616
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Comment or this will be closed in 7 days.'
1717
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'

.github/workflows/validate.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ jobs:
88
timeout-minutes: 10
99

1010
steps:
11-
- uses: actions/checkout@v6
12-
- uses: actions/setup-node@v6
11+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
12+
with:
13+
persist-credentials: false
14+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
1315
with:
1416
node-version: '20'
1517
cache: 'npm'

0 commit comments

Comments
 (0)