Skip to content

Commit 20a26fe

Browse files
authored
Merge pull request #1273 from PHPCSStandards/feature/ghactions-pin-action-runners
GH Actions: "pin" all action runners
2 parents 9d00e0e + deab41d commit 20a26fe

11 files changed

+70
-54
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ updates:
1616
prefix: "GH Actions:"
1717
labels:
1818
- "Type: chores/QA"
19+
cooldown:
20+
semver-major-days: 10
21+
groups:
22+
action-runners:
23+
applies-to: version-updates
24+
update-types:
25+
- "minor"
26+
- "patch"
1927

2028
# Handle updates for the orphan gh-pages branch.
2129
- package-ecosystem: "github-actions"
@@ -28,3 +36,11 @@ updates:
2836
prefix: "GH Pages/Actions:"
2937
labels:
3038
- "Type: chores/QA"
39+
cooldown:
40+
semver-major-days: 10
41+
groups:
42+
action-runners:
43+
applies-to: version-updates
44+
update-types:
45+
- "minor"
46+
- "patch"

.github/workflows/end-to-end-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ jobs:
3939
run: git config --global core.autocrlf input
4040

4141
- name: Checkout code
42-
uses: actions/checkout@v5
42+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4343

4444
- name: Install PHP
45-
uses: shivammathur/setup-php@v2
45+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # 2.35.5
4646
with:
4747
php-version: ${{ matrix.php }}
4848
ini-values: "error_reporting=-1, display_errors=On, display_startup_errors=On"

.github/workflows/happy-new-year.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ jobs:
4949
run: "echo current year: ${{ steps.year.outputs.NEW_YEAR }} - previous year: ${{ steps.year.outputs.PREVIOUS_YEAR }}"
5050

5151
- name: Checkout code
52-
uses: actions/checkout@v5
52+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5353
with:
5454
ref: ${{ steps.branches.outputs.BASE }}
5555

5656
- name: Update the year in the copyright tag in the fixed file
5757
id: findreplace
58-
uses: jacobtomlinson/gha-find-replace@v3
58+
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5 # 3.0.5
5959
with:
6060
find: "* @copyright ${{ steps.year.outputs.PREVIOUS_YEAR }} Squiz Pty Ltd (ABN 77 084 670 600)"
6161
replace: "* @copyright ${{ steps.year.outputs.NEW_YEAR }} Squiz Pty Ltd (ABN 77 084 670 600)"
@@ -73,7 +73,7 @@ jobs:
7373
run: exit 1
7474

7575
- name: Create pull request
76-
uses: peter-evans/create-pull-request@v7
76+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
7777
with:
7878
base: ${{ steps.branches.outputs.BASE }}
7979
branch: ${{ steps.branches.outputs.PR_BRANCH }}

.github/workflows/label-merge-conflicts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: Check PRs for merge conflicts
25-
uses: eps1lon/actions-label-merge-conflict@v3
25+
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
2626
with:
2727
dirtyLabel: "Status: has merge conflict"
2828
repoToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/label-new-prs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Label new PRs
28-
uses: srvaroa/labeler@v1
28+
uses: srvaroa/labeler@0a20eccb8c94a1ee0bed5f16859aece1c45c3e55 # v1.13.0
2929
env:
3030
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
3131

@@ -38,10 +38,10 @@ jobs:
3838
steps:
3939
# Checkout is needed to use the `use_local_config` option.
4040
- name: Checkout code
41-
uses: actions/checkout@v5
41+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4242

4343
- name: Verify changes to the labeling logic
44-
uses: srvaroa/labeler@v1
44+
uses: srvaroa/labeler@0a20eccb8c94a1ee0bed5f16859aece1c45c3e55 # v1.13.0
4545
with:
4646
use_local_config: true
4747
fail_on_error: true

.github/workflows/label-remove-outdated.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
name: Clean up labels on issue close
1919

2020
steps:
21-
- uses: mondeja/remove-labels-gh-action@v2
21+
- uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2.0.0
2222
with:
2323
token: ${{ secrets.GITHUB_TOKEN }}
2424
labels: |
@@ -35,7 +35,7 @@ jobs:
3535
name: "Clean up labels on PR (re-)review request"
3636

3737
steps:
38-
- uses: mondeja/remove-labels-gh-action@v2
38+
- uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2.0.0
3939
with:
4040
token: ${{ secrets.GITHUB_TOKEN }}
4141
labels: |
@@ -48,7 +48,7 @@ jobs:
4848
name: Clean up labels on PR merge
4949

5050
steps:
51-
- uses: mondeja/remove-labels-gh-action@v2
51+
- uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2.0.0
5252
with:
5353
token: ${{ secrets.GITHUB_TOKEN }}
5454
labels: |
@@ -68,7 +68,7 @@ jobs:
6868
name: Clean up labels on PR close
6969

7070
steps:
71-
- uses: mondeja/remove-labels-gh-action@v2
71+
- uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2.0.0
7272
with:
7373
token: ${{ secrets.GITHUB_TOKEN }}
7474
labels: |

.github/workflows/quicktest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ jobs:
4949
run: git config --global core.autocrlf input
5050

5151
- name: Checkout code
52-
uses: actions/checkout@v5
52+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5353

5454
- name: Install PHP
55-
uses: shivammathur/setup-php@v2
55+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # 2.35.5
5656
with:
5757
php-version: ${{ matrix.php }}
5858
ini-values: 'error_reporting=-1, display_errors=On, display_startup_errors=On'
@@ -61,7 +61,7 @@ jobs:
6161
# Install dependencies and handle caching in one go.
6262
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
6363
- name: Install Composer dependencies
64-
uses: "ramsey/composer-install@v3"
64+
uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # 3.1.1
6565
with:
6666
# Bust the cache at least once a month - output format: YYYY-MM.
6767
custom-cache-suffix: $(date -u "+%Y-%m")

.github/workflows/reusable-build-phar.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333

3434
steps:
3535
- name: Checkout code
36-
uses: actions/checkout@v5
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3737

3838
- name: Setup PHP
39-
uses: shivammathur/setup-php@v2
39+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # 2.35.5
4040
with:
4141
php-version: ${{ inputs.phpVersion }}
4242
coverage: none
@@ -48,15 +48,15 @@ jobs:
4848
# Provide provenance for generated binaries.
4949
- name: Generate artifact attestations
5050
if: ${{ inputs.createAttestations == true }}
51-
uses: actions/attest-build-provenance@v3
51+
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
5252
with:
5353
subject-path: |
5454
${{ github.workspace }}/phpcs.phar
5555
${{ github.workspace }}/phpcbf.phar
5656
5757
- name: Upload the PHPCS phar
5858
if: ${{ inputs.uploadArtifacts == true }}
59-
uses: actions/upload-artifact@v4
59+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6060
with:
6161
name: phpcs-phar
6262
path: ./phpcs.phar
@@ -65,7 +65,7 @@ jobs:
6565

6666
- name: Upload the PHPCBF phar
6767
if: ${{ inputs.uploadArtifacts == true }}
68-
uses: actions/upload-artifact@v4
68+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6969
with:
7070
name: phpcbf-phar
7171
path: ./phpcbf.phar

.github/workflows/test.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ jobs:
114114
run: git config --global core.autocrlf input
115115

116116
- name: Checkout code
117-
uses: actions/checkout@v5
117+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
118118

119119
- name: "libxml2: find the latest relevant tag"
120120
if: ${{ matrix.libxml_minor }}
121121
id: libxml_version
122-
uses: oprypin/find-latest-tag@v1
122+
uses: oprypin/find-latest-tag@dd2729fe78b0bb55523ae2b2a310c6773a652bd1 # v1.1.2
123123
with:
124124
repository: GNOME/libxml2
125125
releases-only: false # The libxml2 repository doesn't use GitHub's "release" feature.
@@ -138,7 +138,7 @@ jobs:
138138
- name: "libxml2: restore cache"
139139
if: ${{ matrix.libxml_minor }}
140140
id: libxml_cache_restore
141-
uses: actions/cache/restore@v4
141+
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
142142
with:
143143
path: "libxml2-${{ steps.libxml_patch_version.outputs.PATCH }}"
144144
key: "${{ matrix.os }}-libxml-${{ matrix.libxml_minor }}-${{ steps.libxml_patch_version.outputs.PATCH }}"
@@ -166,7 +166,7 @@ jobs:
166166
- name: "libxml2: save cache"
167167
if: ${{ matrix.libxml_minor && steps.libxml_cache_restore.outputs.cache-hit != 'true' }}
168168
id: libxml_cache_save
169-
uses: actions/cache/save@v4
169+
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
170170
with:
171171
path: "libxml2-${{ steps.libxml_patch_version.outputs.PATCH }}"
172172
key: ${{ steps.libxml_cache_restore.outputs.cache-primary-key }}
@@ -197,7 +197,7 @@ jobs:
197197
# yamllint enable rule:line-length
198198
199199
- name: Install PHP
200-
uses: shivammathur/setup-php@v2
200+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # 2.35.5
201201
with:
202202
php-version: ${{ matrix.php }}
203203
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
@@ -209,7 +209,7 @@ jobs:
209209
# This action also handles the caching of the dependencies.
210210
- name: Set up node
211211
if: ${{ matrix.custom_ini == false }}
212-
uses: actions/setup-node@v5
212+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
213213
with:
214214
node-version: '20'
215215

@@ -224,7 +224,7 @@ jobs:
224224
# Install dependencies and handle caching in one go.
225225
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
226226
- name: Install Composer dependencies
227-
uses: "ramsey/composer-install@v3"
227+
uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # 3.1.1
228228
with:
229229
composer-options: ${{ matrix.php == '8.5' && '--ignore-platform-req=php+' || '' }}
230230
custom-cache-suffix: $(date -u "+%Y-%m")
@@ -257,7 +257,7 @@ jobs:
257257

258258
- name: Download the PHPCS phar
259259
if: ${{ matrix.custom_ini == false }}
260-
uses: actions/download-artifact@v5
260+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
261261
with:
262262
name: phpcs-phar
263263

@@ -302,7 +302,7 @@ jobs:
302302
run: git config --global core.autocrlf input
303303

304304
- name: Checkout code
305-
uses: actions/checkout@v5
305+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
306306

307307
- name: Setup ini config
308308
if: ${{ matrix.custom_ini == true && matrix.os != 'windows-latest' }}
@@ -313,7 +313,7 @@ jobs:
313313
echo 'PHP_INI=, date.timezone=Australia/Sydney, short_open_tag=On' >> "$GITHUB_OUTPUT"
314314
315315
- name: Install PHP
316-
uses: shivammathur/setup-php@v2
316+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # 2.35.5
317317
with:
318318
php-version: ${{ matrix.php }}
319319
ini-values: error_reporting=-1, display_errors=On, display_startup_errors=On${{ steps.set_ini.outputs.PHP_INI }}
@@ -322,7 +322,7 @@ jobs:
322322
# This action also handles the caching of the dependencies.
323323
- name: Set up node
324324
if: ${{ matrix.custom_ini == false }}
325-
uses: actions/setup-node@v5
325+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
326326
with:
327327
node-version: '20'
328328

@@ -337,7 +337,7 @@ jobs:
337337
# Install dependencies and handle caching in one go.
338338
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
339339
- name: Install Composer dependencies
340-
uses: "ramsey/composer-install@v3"
340+
uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # 3.1.1
341341
with:
342342
# Bust the cache at least once a month - output format: YYYY-MM.
343343
custom-cache-suffix: $(date -u "+%Y-%m")
@@ -385,7 +385,7 @@ jobs:
385385
386386
- name: "Upload coverage results to Coveralls (normal run)"
387387
if: ${{ success() }}
388-
uses: coverallsapp/github-action@v2
388+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
389389
with:
390390
format: clover
391391
file: build/logs/clover.xml
@@ -394,7 +394,7 @@ jobs:
394394

395395
- name: "Upload coverage results to Coveralls (CBF run)"
396396
if: ${{ matrix.os != 'windows-latest' && success() }}
397-
uses: coverallsapp/github-action@v2
397+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
398398
with:
399399
format: clover
400400
file: build/logs/clover-cbf.xml
@@ -409,6 +409,6 @@ jobs:
409409

410410
steps:
411411
- name: Coveralls Finished
412-
uses: coverallsapp/github-action@v2
412+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
413413
with:
414414
parallel-finished: true

0 commit comments

Comments
 (0)