2023-06-01 08:13:42 +00:00
|
|
|
# This workflow will update the pinned browsers
|
|
|
|
|
|
|
|
name: 'Update the pinned browsers'
|
|
|
|
|
2023-06-02 12:19:22 +00:00
|
|
|
permissions: read-all
|
|
|
|
|
2023-06-01 08:13:42 +00:00
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# Run everyday at: https://crontab.guru/#0_6_*_*_*.
|
|
|
|
- cron: '0 6 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2024-01-03 12:09:24 +00:00
|
|
|
update-chrome:
|
2023-06-01 08:13:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out repository
|
2024-04-29 08:53:29 +00:00
|
|
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
2023-06-01 08:13:42 +00:00
|
|
|
- name: Set up Node.js
|
2024-02-12 09:49:18 +00:00
|
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
2023-06-01 08:13:42 +00:00
|
|
|
with:
|
|
|
|
cache: npm
|
2024-01-24 10:27:35 +00:00
|
|
|
node-version-file: '.nvmrc'
|
2024-02-21 09:37:35 +00:00
|
|
|
- uses: google/wireit@4aad131006ea85c1e42af927534ebb13426dd730 # setup-github-actions-caching/v1.0.2
|
2023-06-01 08:13:42 +00:00
|
|
|
- name: Install npm dependencies
|
|
|
|
run: npm ci
|
|
|
|
- name: Build Puppeteer
|
|
|
|
run: npm run build -w puppeteer
|
|
|
|
- name: Update Chrome to latest stable version
|
|
|
|
id: update
|
|
|
|
run: |
|
2024-01-03 12:09:24 +00:00
|
|
|
node tools/update_chrome_revision.mjs
|
2023-06-01 08:13:42 +00:00
|
|
|
- name: Create Pull Request
|
2023-06-02 13:37:48 +00:00
|
|
|
if: ${{ steps.update.outputs.commit }}
|
2024-04-29 08:53:29 +00:00
|
|
|
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
|
2023-06-01 08:13:42 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.BROWSER_AUTOMATION_BOT_TOKEN }}
|
2024-01-03 12:09:24 +00:00
|
|
|
branch: browser-automation-bot/update-browser-version-chrome
|
|
|
|
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/puppeteer/puppeteer/blob/main/.github/workflows/update-browser-pins.yml'
|
|
|
|
labels: dependencies
|
|
|
|
update-firefox:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out repository
|
2024-04-29 08:53:29 +00:00
|
|
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
2024-01-03 12:09:24 +00:00
|
|
|
- name: Set up Node.js
|
2024-02-12 09:49:18 +00:00
|
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
2024-01-03 12:09:24 +00:00
|
|
|
with:
|
|
|
|
cache: npm
|
2024-01-24 10:27:35 +00:00
|
|
|
node-version-file: '.nvmrc'
|
2024-02-21 09:37:35 +00:00
|
|
|
- uses: google/wireit@4aad131006ea85c1e42af927534ebb13426dd730 # setup-github-actions-caching/v1.0.2
|
2024-01-03 12:09:24 +00:00
|
|
|
- name: Install npm dependencies
|
|
|
|
run: npm ci
|
|
|
|
- name: Build Puppeteer
|
|
|
|
run: npm run build:test -w @puppeteer/browsers
|
|
|
|
- name: Update Firefox to latest nightly version
|
|
|
|
id: update
|
|
|
|
run: |
|
|
|
|
node packages/browsers/tools/updateVersions.mjs
|
|
|
|
- name: Create Pull Request
|
|
|
|
if: ${{ steps.update.outputs.commit }}
|
2024-04-29 08:53:29 +00:00
|
|
|
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
|
2024-01-03 12:09:24 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.BROWSER_AUTOMATION_BOT_TOKEN }}
|
|
|
|
branch: browser-automation-bot/update-browser-version-firefox
|
2023-06-01 08:13:42 +00:00
|
|
|
delete-branch: true
|
|
|
|
committer: Browser Automation Bot <browser-automation-bot@google.com>
|
|
|
|
author: Browser Automation Bot <browser-automation-bot@google.com>
|
2023-06-02 13:37:48 +00:00
|
|
|
commit-message: ${{ steps.update.outputs.commit }}
|
|
|
|
title: ${{ steps.update.outputs.commit }}
|
2023-06-01 08:13:42 +00:00
|
|
|
body: 'Automatically generated by https://github.com/puppeteer/puppeteer/blob/main/.github/workflows/update-browser-pins.yml'
|
|
|
|
labels: dependencies
|