From dd2e967f6ca54add441fb0efc795dcbe0ae79419 Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Sat, 25 Apr 2026 16:30:33 +1000 Subject: [PATCH] feat: add GitHub Actions workflow to auto-update W3C groups list Adds weekly scheduled workflow that runs update-w3c-groups-list script and commits changes if any groups were added or removed. Closes #395 --- .github/workflows/update-groups.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/update-groups.yml diff --git a/.github/workflows/update-groups.yml b/.github/workflows/update-groups.yml new file mode 100644 index 00000000..9c0fe9ba --- /dev/null +++ b/.github/workflows/update-groups.yml @@ -0,0 +1,33 @@ +name: Update W3C groups list +on: + schedule: + - cron: '23 3 * * 1' # Weekly on Monday at 03:23 UTC + workflow_dispatch: # Allow manual trigger + +permissions: + contents: write + +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: main + - uses: pnpm/action-setup@v6 + - uses: actions/setup-node@v6 + with: + node-version-file: .nvmrc + cache: pnpm + - run: pnpm install --frozen-lockfile + - run: pnpm build + - run: node build/scripts/update-w3c-groups-list.js + env: + DATA_DIR: ${{ github.workspace }}/data + - name: Commit changes + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add --force data/w3c/groups.json + git diff --staged --quiet || git commit -m "chore: auto-update W3C groups list" + git push