99 required : false
1010 default : ' '
1111
12+ permissions :
13+ contents : read
14+
1215# Cancels all previous workflow runs for the same branch that have not yet completed.
1316concurrency :
1417 # The concurrency group contains the workflow name and the branch name.
@@ -17,12 +20,12 @@ concurrency:
1720
1821jobs :
1922
20- actionlint : # -----------------------------------------------------------------------
23+ actionlint :
2124 name : Lint GitHub Actions workflows
2225 runs-on : ubuntu-latest
2326 steps :
2427 - name : Check out source code
25- uses : actions/checkout@v6
28+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
2629
2730 - name : Add problem matcher
2831 run : |
@@ -34,22 +37,22 @@ jobs:
3437 with :
3538 args : -color -shellcheck=
3639
37- lint : # -----------------------------------------------------------------------
40+ lint :
3841 name : Lint PHP files
3942 runs-on : ubuntu-latest
4043 steps :
4144 - name : Check out source code
42- uses : actions/checkout@v6
45+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
4346
4447 - name : Check existence of composer.json file
4548 id : check_composer_file
46- uses : andstor/file-existence-action@v3
49+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
4750 with :
4851 files : " composer.json"
4952
5053 - name : Set up PHP environment
5154 if : steps.check_composer_file.outputs.files_exists == 'true'
52- uses : shivammathur/setup-php@v2
55+ uses : shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
5356 with :
5457 php-version : ' latest'
5558 ini-values : zend.assertions=1, error_reporting=-1, display_errors=On
5962
6063 - name : Install Composer dependencies & cache dependencies
6164 if : steps.check_composer_file.outputs.files_exists == 'true'
62- uses : " ramsey/composer-install@v3 "
65+ uses : " ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 " # v3
6366 env :
6467 COMPOSER_ROOT_VERSION : dev-${{ github.event.repository.default_branch }}
6568 with :
6871
6972 - name : Check existence of vendor/bin/parallel-lint file
7073 id : check_linter_file
71- uses : andstor/file-existence-action@v3
74+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
7275 with :
7376 files : " vendor/bin/parallel-lint"
7477
@@ -95,56 +98,56 @@ jobs:
9598 env :
9699 ADDITIONAL_EXCLUDES : ${{ inputs.parallel-lint-excludes }}
97100
98- lint-gherkin : # ----------------------------------------------------------------
101+ lint-gherkin :
99102 name : Lint Gherkin Feature files
100103 runs-on : ubuntu-latest
101104 steps :
102105 - name : Check out source code
103- uses : actions/checkout@v6
106+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
104107
105108 - name : Setup node
106- uses : actions/setup-node@v6
109+ uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
107110
108111 - name : Download lint rules
109112 run : curl https://raw.githubusercontent.com/wp-cli/.github/refs/heads/main/.gherkin-lintrc -o $RUNNER_TEMP/.gherkin-lintrc
110113
111114 - name : Run linter
112115 run : npx --yes gherkin-lint -c $RUNNER_TEMP/.gherkin-lintrc
113116
114- lint-spellcheck : # ----------------------------------------------------------------
117+ lint-spellcheck :
115118 name : Spell check
116119 runs-on : ubuntu-latest
117120 steps :
118121 - name : Check out source code
119- uses : actions/checkout@v6
122+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
120123
121124 - name : Check existence of config file
122125 id : check_files
123- uses : andstor/file-existence-action@v3
126+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
124127 with :
125128 files : " .typos.toml"
126129
127130 - name : Check spelling
128131 if : steps.check_files.outputs.files_exists == 'true'
129- uses : crate-ci/typos@v1.42.1
132+ uses : crate-ci/typos@65120634e79d8374d1aa2f27e54baa0c364fff5a # v1.42.1
130133
131- phpcs : # ----------------------------------------------------------------------
134+ phpcs :
132135 name : PHPCS
133136 runs-on : ubuntu-latest
134137
135138 steps :
136139 - name : Check out source code
137- uses : actions/checkout@v6
140+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
138141
139142 - name : Check existence of composer.json & phpcs.xml.dist files
140143 id : check_files
141- uses : andstor/file-existence-action@v3
144+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
142145 with :
143146 files : " composer.json, phpcs.xml.dist"
144147
145148 - name : Set up PHP environment
146149 if : steps.check_files.outputs.files_exists == 'true'
147- uses : shivammathur/setup-php@v2
150+ uses : shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
148151 with :
149152 php-version : ' latest'
150153 tools : cs2pr
@@ -153,7 +156,7 @@ jobs:
153156
154157 - name : Install Composer dependencies & cache dependencies
155158 if : steps.check_files.outputs.files_exists == 'true'
156- uses : " ramsey/composer-install@v3 "
159+ uses : " ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 " # v3
157160 env :
158161 COMPOSER_ROOT_VERSION : dev-${{ github.event.repository.default_branch }}
159162 with :
@@ -162,7 +165,7 @@ jobs:
162165
163166 - name : Check existence of vendor/bin/phpcs file
164167 id : check_phpcs_binary_file
165- uses : andstor/file-existence-action@v3
168+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
166169 with :
167170 files : " vendor/bin/phpcs"
168171
@@ -177,23 +180,23 @@ jobs:
177180 cs2pr /tmp/phpcs-checkstyle-report.xml
178181 fi
179182
180- phpstan : # ----------------------------------------------------------------------
183+ phpstan :
181184 name : PHPStan
182185 runs-on : ubuntu-latest
183186
184187 steps :
185188 - name : Check out source code
186- uses : actions/checkout@v6
189+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
187190
188191 - name : Check existence of composer.json & phpcs.xml.dist files
189192 id : check_files
190- uses : andstor/file-existence-action@v3
193+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
191194 with :
192195 files : " composer.json"
193196
194197 - name : Set up PHP environment
195198 if : steps.check_files.outputs.files_exists == 'true'
196- uses : shivammathur/setup-php@v2
199+ uses : shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
197200 with :
198201 php-version : ' latest'
199202 tools : cs2pr
@@ -202,7 +205,7 @@ jobs:
202205
203206 - name : Install Composer dependencies & cache dependencies
204207 if : steps.check_files.outputs.files_exists == 'true'
205- uses : " ramsey/composer-install@v3 "
208+ uses : " ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 " # v3
206209 env :
207210 COMPOSER_ROOT_VERSION : dev-${{ github.event.repository.default_branch }}
208211 with :
@@ -211,7 +214,7 @@ jobs:
211214
212215 - name : Check existence of vendor/bin/phpstan file
213216 id : check_phpstan_binary_file
214- uses : andstor/file-existence-action@v3
217+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
215218 with :
216219 files : " vendor/bin/phpstan"
217220
0 commit comments