-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (33 loc) · 1.06 KB
/
snapshots.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
name: Update Snapshots
on:
workflow_dispatch:
jobs:
update_snapshots:
runs-on: ubuntu-20.04
steps:
- name: Fail if branch is main
if: ${{ github.ref == 'refs/heads/main' }}
run: |
echo "This workflow should not be triggered with workflow_dispatch on main"
exit 1
- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_AUTOMATION_BOT_PUBLIC_APP_ID }}
private-key: ${{ secrets.PR_AUTOMATION_BOT_PUBLIC_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- name: Install dependencies
run: npm ci
- name: Run Playwright tests
run: npm run e2e:snapshots
- name: Commit Playwright updated snapshots
uses: EndBug/add-and-commit@v9
if: ${{ github.ref != 'refs/heads/main' }}
with:
add: e2e
default_author: github_actions
message: "🤖 update snapshots"