Skip to content

Commit feb4353

Browse files
ci: pin GitHub Actions to SHAs and add workflow permissions (#122)
1 parent 16c6dcb commit feb4353

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/composer-diff.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1616
with:
1717
fetch-depth: 0
1818
- name: Generate composer diff
1919
id: composer_diff
20-
uses: IonBazan/composer-diff-action@v1
21-
- uses: marocchino/sticky-pull-request-comment@v2
20+
uses: IonBazan/composer-diff-action@3140157575f6a67799cc80248ae35f5fb303ab15 # v1
21+
- uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2
2222
if: ${{ steps.composer_diff.outputs.composer_diff_exit_code != 0 }}
2323
with:
2424
header: composer-diff

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
push:
44
branches:
55
- '**'
6+
permissions:
7+
contents: read
68
env:
79
TERM: xterm-256color
810
jobs:
@@ -11,7 +13,7 @@ jobs:
1113
runs-on: ubuntu-latest
1214
steps:
1315
- name: Checkout
14-
uses: actions/checkout@v4
16+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1517
- name: PHP Compatibility
1618
uses: pantheon-systems/phpcompatibility-action@dev
1719
with:
@@ -28,16 +30,16 @@ jobs:
2830
matrix:
2931
php_version: [7.4, 8.1, 8.3, 8.4, 8.5] # Versions represent newest 7.x, WP supported with exclusions, and beta support.
3032
steps:
31-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3234
- name: Setup PHP
33-
uses: shivammathur/setup-php@v2
35+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
3436
with:
3537
php-version: ${{ matrix.php_version }}
3638
extensions: mysqli, zip, imagick
3739
- name: Start MySQL
3840
run: sudo systemctl start mysql
3941
- name: Cache dependencies
40-
uses: actions/cache@v4
42+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
4143
with:
4244
path: ~/vendor
4345
key: test-phpunit-dependencies-${{ hashFiles('composer.json') }}

0 commit comments

Comments
 (0)