Update WebDriver BiDi Data #312
This file contains hidden or 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 WebDriver BiDi Data | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "30 4 * * 1-5" | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-webdriver-bidi-data: | |
| if: github.repository == 'mdn/browser-compat-data' | |
| name: Update WebDriver BiDi Data | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| package-manager-cache: false | |
| - name: "Setup git" | |
| run: | | |
| git config user.email 108879845+mdn-bot@users.noreply.github.com | |
| git config user.name mdn-bot | |
| - name: Install | |
| env: | |
| # Temporary workaround to install lefthook hooks. | |
| CI: "" | |
| run: npm ci | |
| - name: Update data | |
| run: | | |
| rm -rf webdriver/bidi | |
| curl -L -o webdriver/bidi.json "${{ secrets.WEBDRIVER_BIDI_UPDATE_URL }}" | |
| npm run split -- webdriver/bidi.json | |
| git add webdriver/bidi | |
| npx lefthook run pre-commit | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| commit-message: Update WebDriver BiDi data | |
| author: mdn-bot <108879845+mdn-bot@users.noreply.github.com> | |
| committer: mdn-bot <108879845+mdn-bot@users.noreply.github.com> | |
| signoff: false | |
| branch: webdriver-bidi | |
| delete-branch: true | |
| add-paths: "webdriver/bidi/*.json" | |
| title: "Update WebDriver BiDi data" | |
| body: | | |
| (This PR was generated by the [`update-webdriver-bidi-data`](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/update-webdriver-bidi-data.yml) workflow.) | |
| draft: false |