@@ -3,25 +3,18 @@ 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
16
6
17
7
env :
18
8
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
+ BROWSER : ${{ github.event.client_payload.browser }}
10
+ REVISION : ${{ github.event.client_payload.revision }}
21
11
22
12
permissions :
23
13
contents : write
24
14
15
+ concurrency :
16
+ group : ' roll-browser-into-playwright-${{ github.event.client_payload.browser }}-${{ github.event.client_payload.revision }}'
17
+
25
18
jobs :
26
19
roll :
27
20
runs-on : ubuntu-24.04
43
36
run : |
44
37
BRANCH_NAME="roll-into-pw-${BROWSER}/${REVISION}"
45
38
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT
39
+
40
+ git fetch origin $BRANCH_NAME:$BRANCH_NAME || true
41
+ if git show-ref --verify --quiet refs/heads/$BRANCH_NAME; then
42
+ echo "exists=1" >> $GITHUB_OUTPUT
43
+ echo "branch $BRANCH_NAME already exists, exiting"
44
+ exit 0
45
+ fi
46
+ echo "exists=0" >> $GITHUB_OUTPUT
47
+
46
48
git config --global user.name microsoft-playwright-automation[bot]
47
49
git config --global user.email 203992400+microsoft-playwright-automation[bot]@users.noreply.github.com
48
50
git checkout -b "$BRANCH_NAME"
56
58
private-key : ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }}
57
59
- name : Create Pull Request
58
60
uses : actions/github-script@v7
61
+ if : ${{ steps.prepare-branch.outputs.exists == '0' }}
59
62
with :
60
63
github-token : ${{ steps.app-token.outputs.token }}
61
64
script : |
0 commit comments