Skip to content

Commit d1aca43

Browse files
Merge pull request #2171 from WordPress/update/workflow-sha-pinning
Pin GitHub actions to SHAs instead of versions
2 parents 440216b + e707863 commit d1aca43

File tree

9 files changed

+34
-34
lines changed

9 files changed

+34
-34
lines changed

.github/workflows/bump-wordpress-tested-up-to.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix: ${{ steps.set-matrix.outputs.plugins }}
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v5
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2020

2121
- name: Configure plugin matrix
2222
id: set-matrix
@@ -46,7 +46,7 @@ jobs:
4646
plugin: ${{ fromJSON(needs.prepare-matrix.outputs.matrix) }}
4747
steps:
4848
- name: Checkout
49-
uses: actions/checkout@v5
49+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
5050

5151
- name: Download WordPress.org readme
5252
run: |
@@ -84,7 +84,7 @@ jobs:
8484
run: cp "./plugins/$PLUGIN_SLUG/readme.txt" "$GITHUB_WORKSPACE/readme.txt"
8585

8686
- name: Push to WordPress.org
87-
uses: 10up/action-wordpress-plugin-asset-update@stable
87+
uses: 10up/action-wordpress-plugin-asset-update@2480306f6f693672726d08b5917ea114cb2825f7 # stable
8888
env:
8989
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
9090
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333
security-events: write
3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v5
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
3737

3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@v3
39+
uses: github/codeql-action/init@528ca598d956c91826bd742262cdfc5d02b77710 # v3
4040
with:
4141
languages: javascript
4242

4343
- name: Perform CodeQL Analysis
44-
uses: github/codeql-action/analyze@v3
44+
uses: github/codeql-action/analyze@528ca598d956c91826bd742262cdfc5d02b77710 # v3

.github/workflows/deploy-plugins.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
matrix: ${{ steps.set-matrix.outputs.plugins }}
2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v5
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
3030

3131
- name: Set matrix
3232
id: set-matrix
@@ -58,10 +58,10 @@ jobs:
5858
plugin: ${{ fromJSON(needs.pre-run.outputs.matrix) }}
5959
steps:
6060
- name: Checkout
61-
uses: actions/checkout@v5
61+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
6262

6363
- name: Setup Node.js (.nvmrc)
64-
uses: actions/setup-node@v5
64+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
6565
with:
6666
node-version-file: '.nvmrc'
6767
cache: npm
@@ -120,14 +120,14 @@ jobs:
120120
121121
- name: Upload artifact
122122
if: steps.check-deployment.outputs.deploy == 'true'
123-
uses: actions/upload-artifact@v4
123+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
124124
with:
125125
name: ${{ matrix.plugin }}
126126
path: ./build/dist
127127

128128
- name: Start deployment
129129
if: steps.check-deployment.outputs.deploy == 'true'
130-
uses: bobheadxi/deployments@v1
130+
uses: bobheadxi/deployments@18dcfe705d6892121d665b21ef9ff448791807f3 # v1
131131
id: wporg-deployment
132132
with:
133133
step: start
@@ -136,7 +136,7 @@ jobs:
136136

137137
- name: Deploy Plugin - ${{ matrix.plugin }}
138138
if: steps.check-deployment.outputs.deploy == 'true'
139-
uses: 10up/action-wordpress-plugin-deploy@stable
139+
uses: 10up/action-wordpress-plugin-deploy@2480306f6f693672726d08b5917ea114cb2825f7 # stable
140140
with:
141141
dry-run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run || false }}
142142
env:
@@ -149,7 +149,7 @@ jobs:
149149

150150
- name: Finish deployment
151151
if: ${{ steps.wporg-deployment.outputs.deployment_id && always() }}
152-
uses: bobheadxi/deployments@v1
152+
uses: bobheadxi/deployments@18dcfe705d6892121d665b21ef9ff448791807f3 # v1
153153
with:
154154
step: finish
155155
token: ${{ secrets.GITHUB_TOKEN }}
@@ -172,7 +172,7 @@ jobs:
172172
steps:
173173
- name: Check artifact existence
174174
id: artifact-existence
175-
uses: actions/github-script@v8
175+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
176176
with:
177177
script: |
178178
const getArtifact = await github.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}', {
@@ -191,14 +191,14 @@ jobs:
191191
192192
- name: Download artifact
193193
if: steps.artifact-existence.outputs.exists == 'true'
194-
uses: actions/download-artifact@v5
194+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
195195
with:
196196
name: ${{ matrix.plugin }}
197197
path: ./build/dist
198198

199199
- name: Upload release assets
200200
if: steps.artifact-existence.outputs.exists == 'true'
201-
uses: softprops/action-gh-release@v2
201+
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2
202202
with:
203203
files: |
204204
./build/dist/${{ matrix.plugin }}.zip

.github/workflows/e2e-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
timeout-minutes: 20
3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v5
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
3737

3838
- name: Setup Node.js (.nvmrc)
39-
uses: actions/setup-node@v5
39+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
4040
with:
4141
node-version-file: '.nvmrc'
4242
cache: npm

.github/workflows/js-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ jobs:
3737
runs-on: ubuntu-latest
3838
timeout-minutes: 20
3939
steps:
40-
- uses: styfle/[email protected]
41-
- uses: actions/checkout@v5
40+
- uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
41+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4242
- name: Setup Node.js (via .nvmrc)
43-
uses: actions/setup-node@v5
43+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
4444
with:
4545
node-version-file: '.nvmrc'
4646
cache: npm

.github/workflows/php-lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ jobs:
3333
runs-on: ubuntu-latest
3434
timeout-minutes: 20
3535
steps:
36-
- uses: styfle/[email protected]
37-
- uses: actions/checkout@v5
38-
- uses: shivammathur/setup-php@v2
36+
- uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
37+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
38+
- uses: shivammathur/setup-php@d64e82cc0fa7ec46f91dd4c73d6acc91adbd1937 # v2
3939
with:
4040
php-version: latest
4141
- name: Get Composer Cache Directory
4242
id: composer-cache
4343
run: |
4444
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
45-
- uses: actions/cache@v4
45+
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4
4646
with:
4747
path: ${{ steps.composer-cache.outputs.dir }}
4848
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

.github/workflows/php-test-plugins.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ jobs:
5757
WP_ENV_PHP_VERSION: ${{ matrix.php }}
5858
WP_ENV_CORE: ${{ matrix.wp == 'trunk' && 'WordPress/WordPress' || format( 'https://wordpress.org/wordpress-{0}.zip', matrix.wp ) }}
5959
steps:
60-
- uses: styfle/[email protected]
61-
- uses: actions/checkout@v5
60+
- uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
61+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
6262
- name: Setup Node.js (.nvmrc)
63-
uses: actions/setup-node@v5
63+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
6464
with:
6565
node-version-file: '.nvmrc'
6666
cache: npm
@@ -121,7 +121,7 @@ jobs:
121121
fi
122122
- name: Upload single site coverage reports to Codecov
123123
if: ${{ matrix.coverage == true }}
124-
uses: codecov/codecov-action@v5
124+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
125125
with:
126126
token: ${{ secrets.CODECOV_TOKEN }}
127127
directory: ./single-site-reports
@@ -130,7 +130,7 @@ jobs:
130130
fail_ci_if_error: true
131131
- name: Upload multisite coverage reports to Codecov
132132
if: ${{ matrix.coverage == true }}
133-
uses: codecov/codecov-action@v5
133+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
134134
with:
135135
token: ${{ secrets.CODECOV_TOKEN }}
136136
directory: ./multisite-reports

.github/workflows/props-bot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ jobs:
7171
7272
steps:
7373
- name: Gather a list of contributors
74-
uses: WordPress/props-bot-action@trunk
74+
uses: WordPress/props-bot-action@e04f1e3b9824144892bfe3d278865f4b7c3e25a1 # trunk
7575

7676
- name: Remove the props-bot label
77-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
77+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
7878
if: ${{ github.event.action == 'labeled' && 'props-bot' == github.event.label.name }}
7979
with:
8080
retries: 2

.github/workflows/spell-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
name: Spell Check with Typos
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v5
10+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
1111
- name: Search for misspellings
12-
uses: crate-ci/typos@master
12+
uses: crate-ci/typos@85f62a8a84f939ae994ab3763f01a0296d61a7ee # master
1313
with:
1414
config: ./.github/typos.toml

0 commit comments

Comments
 (0)