2021-08-17 15:23:40 +03:00
|
|
|
name: Roll Browser into Playwright
|
|
|
|
|
|
|
|
on:
|
|
|
|
repository_dispatch:
|
|
|
|
types: [roll_into_pw]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
roll:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
2021-09-27 16:32:07 +03:00
|
|
|
node-version: 16
|
2022-01-29 18:56:50 +03:00
|
|
|
- run: npm i -g npm@8.3
|
2021-08-17 15:23:40 +03:00
|
|
|
- run: npm ci
|
|
|
|
- run: npm run build
|
2021-08-17 15:36:44 +03:00
|
|
|
- name: Install dependencies
|
2021-10-11 17:52:17 +03:00
|
|
|
run: npx playwright install-deps
|
2021-08-17 15:23:40 +03:00
|
|
|
- name: Roll to new revision
|
|
|
|
run: |
|
|
|
|
./utils/roll_browser.js ${{ github.event.client_payload.browser }} ${{ github.event.client_payload.revision }}
|
2021-08-30 18:46:32 +03:00
|
|
|
npm run build
|
2021-08-17 15:23:40 +03:00
|
|
|
- name: Prepare branch
|
|
|
|
id: prepare-branch
|
|
|
|
run: |
|
|
|
|
BASE_POSITION="${{ steps.bump-chromium.outputs.BASE_POSITION }}"
|
2021-08-18 11:15:36 +03:00
|
|
|
BRANCH_NAME="roll-into-pw-${{ github.event.client_payload.browser }}/${{ github.event.client_payload.revision }}"
|
2021-08-17 15:23:40 +03:00
|
|
|
echo "::set-output name=BRANCH_NAME::$BRANCH_NAME"
|
|
|
|
git config --global user.name github-actions
|
|
|
|
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
|
|
git checkout -b "$BRANCH_NAME"
|
|
|
|
git add .
|
|
|
|
git commit -m "feat(${{ github.event.client_payload.browser }}): roll to r${{ github.event.client_payload.revision }}"
|
|
|
|
git push origin $BRANCH_NAME
|
|
|
|
- name: Create Pull Request
|
|
|
|
uses: actions/github-script@v4
|
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
await github.pulls.create({
|
|
|
|
owner: 'microsoft',
|
|
|
|
repo: 'playwright',
|
|
|
|
head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}',
|
2021-12-08 09:58:33 +03:00
|
|
|
base: 'main',
|
2021-08-17 15:36:44 +03:00
|
|
|
title: 'feat(${{ github.event.client_payload.browser }}): roll to r${{ github.event.client_payload.revision }}',
|
2021-08-17 15:23:40 +03:00
|
|
|
});
|