Update the pinned browser version #11210
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
# This workflow will update the version in .browser and open a PR | |
name: 'Update the pinned browser version' | |
# Declare default permissions as read only. | |
permissions: read-all | |
on: | |
schedule: | |
# Run every 12 hours | |
- cron: '0 */12 * * *' | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Checkout `browser-automation-bot/update-browser-version` if exits | |
run: | | |
(git ls-remote --exit-code --heads origin refs/heads/browser-automation-bot/update-browser-version && | |
git checkout browser-automation-bot/update-browser-version && | |
git rebase main) || exit 0 | |
- name: Set up Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version-file: '.nvmrc' | |
cache: npm | |
- name: Install and build npm dependencies | |
run: npm ci | |
- name: Update browser pin and devtools-protocol | |
id: update | |
run: node tools/update_chrome_revision.mjs | |
- name: Create Pull Request | |
if: ${{ steps.update.outputs.commit }} | |
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 | |
with: | |
token: ${{ secrets.BROWSER_AUTOMATION_BOT_TOKEN }} | |
branch: browser-automation-bot/update-browser-version | |
delete-branch: true | |
committer: Browser Automation Bot <browser-automation-bot@google.com> | |
author: Browser Automation Bot <browser-automation-bot@google.com> | |
commit-message: ${{ steps.update.outputs.commit }} | |
title: ${{ steps.update.outputs.commit }} | |
body: 'Automatically generated by https://github.com/GoogleChromeLabs/chromium-bidi/blob/main/.github/workflows/update-browser-version.yml' | |
push-to-fork: browser-automation-bot/chromium-bidi |