generated from idealjs/mono-template
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (64 loc) · 1.86 KB
/
ci-check.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CI Check
on:
pull_request:
branches:
- main
merge_group:
branches:
- main
jobs:
ci-check:
name: CI Check
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.45.1-jammy
options: --user 1001
steps:
- name: Generate a token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.IDEALJS_BOT_APP_ID }}
private_key: ${{ secrets.IDEALJS_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- name: Install Dependencies
run: yarn install --immutable
- name: Update Playwright Snapshot
run: yarn workspace website test
update-snapshot:
needs: [ci-check]
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }}
name: Update Snapshot
environment:
name: approvers
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.45.1-jammy
options: --user 1001
steps:
- name: Generate a token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.IDEALJS_BOT_APP_ID }}
private_key: ${{ secrets.IDEALJS_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- name: Install Dependencies
run: yarn install --immutable
- name: Update Playwright Snapshot
run: yarn workspace website test -u
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update image snapshot"