Skip to content

Commit

Permalink
tools: add WPT updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Mert Can Altin committed Aug 21, 2024
1 parent 7f13df5 commit 380a165
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/update-wpt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Update WPT

on:
workflow_dispatch:
schedule:
# Run once a week at 12:00 AM UTC on Sunday.
- cron: 0 0 * * *

jobs:
update-wpt:
name: Update WPT
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
sparse-checkout: |
!test/fixtures/wpt
- name: Clone WPT Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: web-platform-tests/wpt
path: test/fixtures/wpt
sparse_checkout: common/ eventsource/ fetch/ interfaces/ mimesniff/ resources/ service-workers/ storage/ websockets/ xhr/ LICENSE.md
persist-credentials: false
- name: Move WPT Files
run: |
rm -rf test/fixtures/wpt/.git
echo "NEW_VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Create Pull Request
uses: gr2m/create-or-update-pull-request-action@86ec1766034c8173518f61d2075cc2a173fb8c97 # v1.9.4
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
with:
author: Node.js GitHub Bot <[email protected]>
body: This is an automated update of the WPT to ${{ env.NEW_VERSION }}.
branch: actions/update-wpt # Custom branch *just* for this Action.
commit-message: 'test: update WPT to ${{ env.NEW_VERSION }}'
labels: test
title: 'test: update WPT to ${{ env.NEW_VERSION }}'
update-pull-request-title-and-body: true

0 comments on commit 380a165

Please sign in to comment.