-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (31 loc) · 1.05 KB
/
playwright-update.yml
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
name: Playwright Updates
on:
workflow_dispatch:
jobs:
test:
timeout-minutes: 600
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Update Playwright tests
run: npx playwright test -u
- name: Commit ScreenShot
run: |
set -x
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
git switch -c update-screenshots/${GITHUB_REF}
git commit -m "test: update screenshots. ${GITHUB_REF}"
# 対象のブランチへ画像を更新したブランチからPRを発行
- name: Create PR
run: gh pr create --base ${GITHUB_REF} --title "update-screenshots ${GITHUB_REF}" --body ""