-
Notifications
You must be signed in to change notification settings - Fork 9.4k
84 lines (79 loc) · 3.4 KB
/
update-browser-pins.yml
File metadata and controls
84 lines (79 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This workflow will update the pinned browsers
name: 'Update the pinned browsers'
permissions: read-all
on:
schedule:
# Run everyday at: https://crontab.guru/#0_6_*_*_*.
- cron: '0 6 * * *'
workflow_dispatch:
jobs:
update-chrome:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
cache: npm
node-version-file: '.nvmrc'
- uses: google/wireit@9d7c2e5346f8ef1b1ab6014c4e96c74e234f7ed5 # setup-github-actions-caching/v2.0.4
- 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: |
node tools/update_browser_revision.mjs
env:
BROWSER_TO_UPDATE: 'chrome'
- name: Create Pull Request
if: ${{ steps.update.outputs.commit }}
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.BROWSER_AUTOMATION_BOT_TOKEN }}
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'
push-to-fork: browser-automation-bot/puppeteer
labels: full-ci
update-firefox:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
cache: npm
node-version-file: '.nvmrc'
- uses: google/wireit@9d7c2e5346f8ef1b1ab6014c4e96c74e234f7ed5 # setup-github-actions-caching/v2.0.4
- name: Install npm dependencies
run: npm ci
- name: Build Puppeteer
run: npm run build -w puppeteer
- name: Update Firefox to latest stable version
id: update
run: |
node tools/update_browser_revision.mjs
env:
BROWSER_TO_UPDATE: 'firefox'
- name: Create Pull Request
if: ${{ steps.update.outputs.commit }}
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.BROWSER_AUTOMATION_BOT_TOKEN }}
branch: browser-automation-bot/update-browser-version-firefox
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'
push-to-fork: browser-automation-bot/puppeteer
labels: full-ci