-
Notifications
You must be signed in to change notification settings - Fork 21
37 lines (37 loc) · 1.38 KB
/
update-screenshots.yml
File metadata and controls
37 lines (37 loc) · 1.38 KB
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 screenshots
on:
workflow_dispatch:
jobs:
update:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.STRYKER_MUTATOR_APP_ID }}
private-key: ${{ secrets.STRYKER_MUTATOR_NPA_KEY }}
- uses: actions/checkout@v6
- uses: ./.github/setup
- run: npx playwright install chromium firefox --with-deps
- run: npx nx run-many -t generate,build:tsc
- run: npx nx run elements:test:integration:update
- name: Get GitHub App User ID
id: get-user-id
shell: bash
run: echo "user-id=$(gh api "/users/${{ steps.generate-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
- run: |
git config --global user.name '${{ steps.generate-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.generate-token.outputs.app-slug }}[bot]@users.noreply.github.com'
- name: Commit
run: |
git add .
git commit -m "test(screenshots): update screenshots for ${{ runner.os }}"
git pull --rebase
git push