@@ -3,9 +3,21 @@ name: Roll Browser into Playwright
3
3
on :
4
4
repository_dispatch :
5
5
types : [roll_into_pw]
6
+ workflow_dispatch :
7
+ inputs :
8
+ browser :
9
+ description : ' Browser name, e.g. chromium'
10
+ required : true
11
+ type : string
12
+ revision :
13
+ description : ' Browser revision without v prefix, e.g. 1234'
14
+ required : true
15
+ type : string
6
16
7
17
env :
8
18
ELECTRON_SKIP_BINARY_DOWNLOAD : 1
19
+ BROWSER : ${{ github.event.client_payload.browser || github.event.inputs.browser }}
20
+ REVISION : ${{ github.event.client_payload.revision || github.event.inputs.revision }}
9
21
10
22
permissions :
11
23
contents : write
@@ -24,19 +36,19 @@ jobs:
24
36
run : npx playwright install-deps
25
37
- name : Roll to new revision
26
38
run : |
27
- ./utils/roll_browser.js ${{ github.event.client_payload.browser }} ${{ github.event.client_payload.revision }}
39
+ ./utils/roll_browser.js $BROWSER $REVISION
28
40
npm run build
29
41
- name : Prepare branch
30
42
id : prepare-branch
31
43
run : |
32
- BRANCH_NAME="roll-into-pw-${{ github.event.client_payload.browser }} /${{ github.event.client_payload.revision } }"
44
+ BRANCH_NAME="roll-into-pw-${BROWSER} /${REVISION }"
33
45
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT
34
46
git config --global user.name github-actions
35
47
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
36
48
git checkout -b "$BRANCH_NAME"
37
49
git add .
38
- git commit -m "feat(${{ github.event.client_payload.browser }} ): roll to r${{ github.event.client_payload.revision } }"
39
- git push origin $BRANCH_NAME
50
+ git commit -m "feat(${BROWSER} ): roll to r${REVISION }"
51
+ git push origin $BRANCH_NAME --force
40
52
- name : Create Pull Request
41
53
uses : actions/github-script@v7
42
54
with :
47
59
repo: 'playwright',
48
60
head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}',
49
61
base: 'main',
50
- title: 'feat(${{ github.event.client_payload.browser }}): roll to r${{ github.event.client_payload.revision }}',
62
+ title: 'feat(${{ env.BROWSER }}): roll to r${{ env.REVISION }}',
51
63
});
52
64
await github.rest.issues.addLabels({
53
65
owner: 'microsoft',
0 commit comments