Skip to content

Commit e1f3520

Browse files
authored
chore: pin third-party GitHub Actions to commit SHAs (#2961)
Tracking: DEVPROD-1072 Co-authored-by: Mahangu Weerasinghe <mahangu.weerasinghe@automattic.com>
1 parent 099591f commit e1f3520

9 files changed

Lines changed: 39 additions & 17 deletions

File tree

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
open-pull-requests-limit: 10
9+
groups:
10+
actions-minor-patch:
11+
patterns:
12+
- "*"
13+
update-types:
14+
- "minor"
15+
- "patch"
16+
actions-major:
17+
patterns:
18+
- "*"
19+
update-types:
20+
- "major"
21+
cooldown:
22+
default-days: 7

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
node-version-file: '.nvmrc'
3434

3535
- name: Setup PHP
36-
uses: shivammathur/setup-php@v2
36+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
3737
with:
3838
php-version: '8.2'
3939

.github/workflows/cron_qit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
env:
4242
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
4343
steps:
44-
- uses: act10ns/slack@v2
44+
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
4545
with:
4646
status: success
4747
message: 'Scheduled workflow <{{workflowUrl}}|{{workflow}}> with run ID <{{workflowRunUrl}}|{{runId}}> passed.'
@@ -54,7 +54,7 @@ jobs:
5454
env:
5555
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
5656
steps:
57-
- uses: act10ns/slack@v2
57+
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
5858
with:
5959
status: failure
6060
message: 'Scheduled workflow <{{workflowUrl}}|{{workflow}}> with run ID <{{workflowRunUrl}}|{{runId}}> failed. You can find the results in the artifacts section.'

.github/workflows/e2e_runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v4
1818
with:
1919
submodules: recursive
20-
- uses: shivammathur/setup-php@v2
20+
- uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
2121
with:
2222
php-version: ${{ inputs.php_version }}
2323
tools: composer

.github/workflows/e2e_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v3
1313
with:
1414
submodules: recursive
15-
- uses: shivammathur/setup-php@v2
15+
- uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
1616
with:
1717
php-version: 8.2
1818
tools: composer

.github/workflows/manual_qit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ jobs:
164164
env:
165165
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
166166
steps:
167-
- uses: act10ns/slack@v2
167+
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
168168
with:
169169
status: success
170170
message: 'Test Runner Workflow <{{workflowUrl}}|{{workflow}}> with run ID <{{workflowRunUrl}}|{{runId}}> passed.'
@@ -177,7 +177,7 @@ jobs:
177177
env:
178178
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
179179
steps:
180-
- uses: act10ns/slack@v2
180+
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
181181
with:
182182
status: cancelled
183183
message: 'Test Runner Workflow <{{workflowUrl}}|{{workflow}}> with run ID <{{workflowRunUrl}}|{{runId}}> cancelled.'
@@ -190,7 +190,7 @@ jobs:
190190
env:
191191
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
192192
steps:
193-
- uses: act10ns/slack@v2
193+
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
194194
with:
195195
status: failure
196196
message: 'Test Runner Workflow <{{workflowUrl}}|{{workflow}}> with run ID <{{workflowRunUrl}}|{{runId}}> failed.'

.github/workflows/merge_to_trunk.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
env:
4242
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
4343
steps:
44-
- uses: act10ns/slack@v2
44+
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
4545
with:
4646
status: success
4747
message: "Workflow <{{workflowUrl}}|{{workflow}}> with run ID <{{workflowRunUrl}}|{{runId}}> in PR <{{refUrl}}|{{ref}}> passed."
@@ -54,7 +54,7 @@ jobs:
5454
env:
5555
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
5656
steps:
57-
- uses: act10ns/slack@v2
57+
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
5858
with:
5959
status: cancelled
6060
message: "Workflow <{{workflowUrl}}|{{workflow}}> with run ID <{{workflowRunUrl}}|{{runId}}> in PR <{{refUrl}}|{{ref}}> cancelled."
@@ -67,7 +67,7 @@ jobs:
6767
env:
6868
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
6969
steps:
70-
- uses: act10ns/slack@v2
70+
- uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
7171
with:
7272
status: failure
7373
message: "Workflow <{{workflowUrl}}|{{workflow}}> with run ID <{{workflowRunUrl}}|{{runId}}> in PR <{{refUrl}}|{{ref}}> failed."

.github/workflows/php_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
with:
1313
submodules: recursive
1414
- name: Setup PHP
15-
uses: shivammathur/setup-php@v2
15+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
1616
with:
1717
php-version: '7.4'
1818
- name: Lint
@@ -68,14 +68,14 @@ jobs:
6868
- name: Checkout WooCommerce
6969
run: git clone --depth=1 --branch=${{ matrix.wc-version }} https://github.com/woocommerce/woocommerce.git /tmp/woocommerce
7070
- name: Setup PHP
71-
uses: shivammathur/setup-php@v2
71+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
7272
with:
7373
php-version: '8.2'
7474
- name: Get WC pinned pnpm version
7575
id: get_wc_pnpm_version
7676
run: echo "WC_PNPM=$( grep packageManager /tmp/woocommerce/package.json | sed -nr 's/.+packageManager.+pnpm@([[:digit:].]+).+/\1/p' )" >> "$GITHUB_OUTPUT"
7777
- name: Setup PNPM
78-
uses: pnpm/action-setup@v2
78+
uses: pnpm/action-setup@eae0cfeb286e66ffb5155f1a79b90583a127a68b # v2.4.1
7979
with:
8080
version: ${{ steps.get_wc_pnpm_version.outputs.WC_PNPM }}
8181
- uses: actions/setup-node@v3

.github/workflows/unit_test_runner.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
submodules: recursive
2525
- name: Setup PHP
26-
uses: shivammathur/setup-php@v2
26+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
2727
with:
2828
php-version: '7.4'
2929
- name: Lint
@@ -73,14 +73,14 @@ jobs:
7373
- name: Checkout WooCommerce
7474
run: git clone --depth=1 --branch=${{ env.WC_VERSION }} https://github.com/woocommerce/woocommerce.git /tmp/woocommerce
7575
- name: Setup PHP
76-
uses: shivammathur/setup-php@v2
76+
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
7777
with:
7878
php-version: ${{ env.PHP_VERSION }}
7979
- name: Get WC pinned pnpm version
8080
id: get_wc_pnpm_version
8181
run: echo "WC_PNPM=$( grep packageManager /tmp/woocommerce/package.json | sed -nr 's/.+packageManager.+pnpm@([[:digit:].]+).+/\1/p' )" >> "$GITHUB_OUTPUT"
8282
- name: Setup PNPM
83-
uses: pnpm/action-setup@v2
83+
uses: pnpm/action-setup@eae0cfeb286e66ffb5155f1a79b90583a127a68b # v2.4.1
8484
with:
8585
version: ${{ steps.get_wc_pnpm_version.outputs.WC_PNPM }}
8686
- uses: actions/setup-node@v3

0 commit comments

Comments
 (0)