1717 type : number
1818 required : false
1919 default : 0
20+ pull-request-title :
21+ type : string
22+ required : false
23+ default : ' '
2024
2125jobs :
2226 is-fork-pull-request :
@@ -185,6 +189,35 @@ jobs:
185189 path : packages/examples/packages
186190 key : cache-examples-${{ needs.prepare.outputs.COMMIT_SHA }}
187191
192+ update-chrome :
193+ name : Update Chrome
194+ runs-on : ubuntu-latest
195+ if : ${{ inputs.dependabot == true && contains(inputs.pull-request-title, 'chromedriver') }}
196+ needs :
197+ - prepare
198+ - dedupe-yarn-lock
199+ steps :
200+ - name : Restore yarn.lock
201+ uses : actions/cache/restore@v4
202+ with :
203+ path : yarn.lock
204+ key : cache-yarn-lock-${{ needs.prepare.outputs.COMMIT_SHA }}
205+ fail-on-cache-miss : true
206+ - name : Setup Node.js
207+ uses : actions/setup-node@v4
208+ with :
209+ node-version-file : ' .nvmrc'
210+ cache : ' yarn'
211+ - name : Install dependencies from cache
212+ run : yarn --immutable
213+ - name : Update Chrome
214+ run : yarn update-chrome
215+ - name : Cache install script
216+ uses : actions/cache/save@v4
217+ with :
218+ path : scripts/install-chrome.sh
219+ key : cache-chrome-${{ needs.prepare.outputs.COMMIT_SHA }}
220+
188221 commit-result :
189222 name : Commit result
190223 runs-on : ubuntu-latest
@@ -193,6 +226,7 @@ jobs:
193226 - dedupe-yarn-lock
194227 - regenerate-lavamoat-policies
195228 - update-examples
229+ - update-chrome
196230 steps :
197231 - name : Checkout repository
198232 uses : actions/checkout@v4
@@ -245,5 +279,17 @@ jobs:
245279 run : |
246280 git add packages/examples/packages
247281 git commit -m "${COMMIT_PREFIX}Update example snaps" || true
282+ - name : Restore install script
283+ if : ${{ inputs.dependabot == true && contains(inputs.pull-request-title, 'chromedriver') }}
284+ uses : actions/cache/restore@v4
285+ with :
286+ path : scripts/install-chrome.sh
287+ key : cache-chrome-${{ needs.prepare.outputs.COMMIT_SHA }}
288+ fail-on-cache-miss : true
289+ - name : Commit install script
290+ if : ${{ inputs.dependabot == true && contains(inputs.pull-request-title, 'chromedriver') }}
291+ run : |
292+ git add scripts/install-chrome.sh
293+ git commit -m "${COMMIT_PREFIX}Update install Chrome script" || true
248294 - name : Push changes
249295 run : git push
0 commit comments