Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/update-groups.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Update W3C groups list
on:
schedule:
- cron: '23 3 * * 1' # Weekly on Monday at 03:23 UTC

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to do daily.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, wait, this needs to happen while the server is running, not from here. The repo doesn’t store data.

workflow_dispatch: # Allow manual trigger

Comment thread
marcoscaceres marked this conversation as resolved.
permissions:
contents: write

jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: main
- uses: pnpm/action-setup@v6
Comment thread
marcoscaceres marked this conversation as resolved.
- 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: |

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should only commit if there’s a change.

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
Comment thread
marcoscaceres marked this conversation as resolved.
Comment thread
marcoscaceres marked this conversation as resolved.
Loading