|
8 | 8 | inputs:
|
9 | 9 | subsystems:
|
10 | 10 | description: Subsystem to run the update for
|
11 |
| - required: false |
12 |
| - default: '["url", "urlpattern", "WebCryptoAPI"]' |
| 11 | + required: true |
| 12 | + default: all |
| 13 | + type: choice |
| 14 | + # Reminder to keep this list in sync with the SUBSYSTEM_LIST env variable |
| 15 | + options: |
| 16 | + - all |
| 17 | + - url |
| 18 | + - urlpattern |
| 19 | + - WebCryptoAPI |
13 | 20 |
|
14 | 21 | permissions:
|
15 | 22 | contents: read
|
16 | 23 |
|
17 | 24 | env:
|
18 | 25 | NODE_VERSION: lts/*
|
| 26 | + # Reminder to keep this list in sync with the workflow dispatch input options |
| 27 | + SUBSYSTEM_LIST: '["url", "urlpattern", "WebCryptoAPI"]' |
19 | 28 |
|
20 | 29 | jobs:
|
21 | 30 | wpt-subsystem-update:
|
|
24 | 33 | strategy:
|
25 | 34 | fail-fast: false
|
26 | 35 | matrix:
|
27 |
| - subsystem: ${{ fromJSON(github.event.inputs.subsystems || '["url", "urlpattern", "WebCryptoAPI"]') }} |
| 36 | + # keep list of subsystems in sync with the options in the workflow dispatch input |
| 37 | + subsystem: ${{ (inputs.subsystems == 'all') && fromJSON(env.SUBSYSTEM_LIST) || fromJSON('["' + inputs.subsystems + '"]') }} |
28 | 38 |
|
29 | 39 | steps:
|
30 | 40 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
68 | 78 | SUBSYSTEM: ${{ matrix.subsystem }}
|
69 | 79 |
|
70 | 80 | - name: Open or update PR for the subsystem update
|
71 |
| - uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5 |
| 81 | + uses: gr2m/create-or-update-pull-request-action@b65137ca591da0b9f43bad7b24df13050ea45d1b # v1.10.1 |
72 | 82 | with:
|
73 |
| - branch: actions/update-wpt-${{ matrix.subsystem }} |
| 83 | + # The action used will match by prefix, which means that url will match urlpattern, |
| 84 | + # and update the wrong PR. This is why we need a suffix to differentiate the PRs. |
| 85 | + branch: actions/update-${{ matrix.subsystem }}-wpt |
74 | 86 | author: Node.js GitHub Bot <[email protected]>
|
75 | 87 | title: 'test: update WPT for ${{ matrix.subsystem }} to ${{ env.short_version }}'
|
76 | 88 | commit-message: 'test: update WPT for ${{ matrix.subsystem }} to ${{ env.short_version }}'
|
|
0 commit comments