From fd34510741da733cb5388f1616a2d97cd6bfdde4 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Sat, 2 Nov 2024 20:24:19 +0000 Subject: [PATCH] tools: run daily WPT.fyi report on all supported releases PR-URL: https://github.com/nodejs/node/pull/55619 Reviewed-By: Richard Lau Reviewed-By: Yagiz Nizipli --- .github/workflows/daily-wpt-fyi.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/daily-wpt-fyi.yml b/.github/workflows/daily-wpt-fyi.yml index 0cea4b01619b30..35f326365f1865 100644 --- a/.github/workflows/daily-wpt-fyi.yml +++ b/.github/workflows/daily-wpt-fyi.yml @@ -6,11 +6,6 @@ name: Daily WPT report on: workflow_dispatch: - inputs: - node-versions: - description: Node.js versions (as supported by actions/setup-node) to test as JSON array - required: false - default: '["current", "lts/*", "lts/-1"]' schedule: # This is 20 minutes after `epochs/daily` branch is triggered to be created # in WPT repo. @@ -24,11 +19,22 @@ permissions: contents: read jobs: - report: + collect-versions: if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.query.outputs.matrix }} + steps: + - id: query + run: | + 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"]') + echo "matrix=$matrix" >> "$GITHUB_OUTPUT" + report: + needs: + - collect-versions strategy: matrix: - node-version: ${{ fromJSON(github.event.inputs.node-versions || '["latest-nightly", "current", "lts/*", "lts/-1"]') }} + node-version: ${{ fromJSON(needs.collect-versions.outputs.matrix) }} fail-fast: false runs-on: ubuntu-latest steps: