GeezerVison is showing github.com — tools: run daily WPT.fyi report on all supported releases · nodejs/node@cba05cd
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/daily-wpt-fyi.yml +13-7Lines changed: 13 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,11 +6,6 @@ name: Daily WPT report |
6 | 6 |
|
7 | 7 | on: |
8 | 8 | workflow_dispatch: |
9 | | - inputs: |
10 | | - node-versions: |
11 | | - description: Node.js versions (as supported by actions/setup-node) to test as JSON array |
12 | | - required: false |
13 | | - default: '["current", "lts/*", "lts/-1"]' |
14 | 9 | schedule: |
15 | 10 | # This is 20 minutes after `epochs/daily` branch is triggered to be created |
16 | 11 | # in WPT repo. |
@@ -24,11 +19,22 @@ permissions: |
24 | 19 | contents: read |
25 | 20 |
|
26 | 21 | jobs: |
27 | | - report: |
| 22 | + collect-versions: |
28 | 23 | if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch' |
| 24 | + runs-on: ubuntu-latest |
| 25 | + outputs: |
| 26 | + matrix: ${{ steps.query.outputs.matrix }} |
| 27 | + steps: |
| 28 | + - id: query |
| 29 | + run: | |
| 30 | + matrix=$(curl -s https://raw.githubusercontent.com/nodejs/Release/refs/heads/main/schedule.json | jq --arg now "$(date +%Y-%m-%d)" '[with_entries(select(.value.end > $now and .value.start < $now)) | keys[] | ltrimstr("v") | tonumber] + ["latest-nightly"]') |
| 31 | + echo "matrix=$matrix" >> "$GITHUB_OUTPUT" |
| 32 | + report: |
| 33 | + needs: |
| 34 | + - collect-versions |
29 | 35 | strategy: |
30 | 36 | matrix: |
31 | | - node-version: ${{ fromJSON(github.event.inputs.node-versions || '["latest-nightly", "current", "lts/*", "lts/-1"]') }} |
| 37 | + node-version: ${{ fromJSON(needs.collect-versions.outputs.matrix) }} |
32 | 38 | fail-fast: false |
33 | 39 | runs-on: ubuntu-latest |
34 | 40 | steps: |
|