mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
54 lines
1.9 KiB
YAML
54 lines
1.9 KiB
YAML
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:
|
|
node-version: 14
|
|
- run: npm i -g npm@8
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- name: Install dependencies
|
|
run: npx playwright install-deps
|
|
- name: Roll to new revision
|
|
run: |
|
|
./utils/roll_browser.js ${{ github.event.client_payload.browser }} ${{ github.event.client_payload.revision }}
|
|
npm run build
|
|
- name: Prepare branch
|
|
id: prepare-branch
|
|
run: |
|
|
BASE_POSITION="${{ steps.bump-chromium.outputs.BASE_POSITION }}"
|
|
BRANCH_NAME="roll-into-pw-${{ github.event.client_payload.browser }}/${{ github.event.client_payload.revision }}"
|
|
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:
|
|
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
|
script: |
|
|
const response = await github.pulls.create({
|
|
owner: 'microsoft',
|
|
repo: 'playwright',
|
|
head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}',
|
|
base: 'main',
|
|
title: 'feat(${{ github.event.client_payload.browser }}): roll to r${{ github.event.client_payload.revision }}',
|
|
});
|
|
await github.issues.addLabels({
|
|
owner: 'microsoft',
|
|
repo: 'playwright',
|
|
issue_number: response.data.number,
|
|
labels: ['CQ1'],
|
|
});
|