Skip to content

Commit a0e9810

Browse files
author
Mert Can Altin
committed
tools: add WPT updater
1 parent ef4bdbf commit a0e9810

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/update-wpt.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Update WPT
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# Run once a week at 12:00 AM UTC on Sunday.
7+
- cron: 0 0 * * *
8+
9+
jobs:
10+
update-wpt:
11+
name: Update WPT
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Repository
18+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
19+
with:
20+
persist-credentials: false
21+
- name: Update WPT
22+
run: |
23+
rm -rf test/fixtures/wpt
24+
mkdir test/fixtures/wpt
25+
- name: Clone WPT Repository
26+
uses: actions/checkout@v2
27+
with:
28+
repository: web-platform-tests/wpt
29+
ref: ${{ github.sha }}
30+
path: test/fixtures/wpt
31+
sparse_checkout: common/ eventsource/ fetch/ interfaces/ mimesniff/ resources/ service-workers/ storage/ websockets/ xhr/ LICENSE.md
32+
- name: Move WPT Files
33+
run: |
34+
rm -rf test/fixtures/wpt/.git
35+
- name: Create Pull Request
36+
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
branch: actions/wpt-update
40+
title: Update WPT
41+
body: Automated update of the WPT
42+
commit-message: 'test: update wpt test'

0 commit comments

Comments
 (0)