-
Notifications
You must be signed in to change notification settings - Fork 30.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mert Can Altin
committed
Aug 21, 2024
1 parent
821ffab
commit 625ec8b
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |