Update WPT Manifest #902
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
name: 'Update WPT Manifest' | |
on: | |
schedule: | |
- cron: '0 13 * * *' | |
workflow_dispatch: | |
jobs: | |
update-wpt-manifest: | |
outputs: | |
prURL: ${{ steps.cpr.outputs.pull-request-url }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: 1.17.x | |
- name: build main | |
run: go build rename_wpt/main.go | |
- name: run main | |
run: ./main | |
- name: Create pull request | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.WPTMETADATA_BOT_USER_PAT }} | |
title: "Update latest WPT Manifest for go_test" | |
commit-message: "Run curl -s -S https://wpt.fyi/api/manifest?sha=latest >> go_test/MANIFEST.json" | |
body: | | |
This automated pull request updates the MANIFEST.json file to the latest WPT manifest daily. GitHub checks run against this manifest. If checks fail in this PR, the failing metadata should be either renamed or deleted according to the WPT repository. | |
branch: actions/wpt-manifest | |
delete-branch: true | |
push-to-fork: wptmetadata-bot/wpt-metadata | |
# Create a separate job for only the steps that need write permissions. | |
enable-auto-merge: | |
runs-on: ubuntu-latest | |
needs: update-wpt-manifest | |
# Need both permissions to enable auto merge. | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
# Could use https://github.com/peter-evans/enable-pull-request-automerge but it recommends using the CLI now | |
# More about the CLI options. We need --auto so that the PR will automatically merge after: | |
# - One review | |
# - The test action is successful. | |
# https://cli.github.com/manual/gh_pr_merge | |
- name: Enable Pull Request Automerge | |
run: gh pr merge --squash --auto "${{ needs.update-wpt-manifest.outputs.prURL }}" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |