generated from linz/template-javascript-hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.32 KB
/
screenshot.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
name: screenshot
on:
pull_request:
push:
branches:
- master
jobs:
screenshot:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: linz/action-typescript@v3
- name: (Screenshot) Screenshot Pull Request Changes
run: |
./bms.mjs --url https://basemaps.linz.govt.nz --output .artifacts/visual-snapshots
- name: Save snapshots
uses: getsentry/action-visual-snapshot@v2
with:
save-only: true
snapshot-path: .artifacts/visual-snapshots
visual-diff:
permissions:
id-token: write
contents: write
checks: write
needs: [screenshot]
name: validate screenshots
if: github.ref != 'refs/heads/master' && github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: AWS Configure
uses: aws-actions/[email protected]
with:
aws-region: ap-southeast-2
mask-aws-account-id: true
role-to-assume: ${{ secrets.AWS_ROLE_SCREENSHOT }}
- name: Diff snapshots
id: visual-snapshots-diff
uses: blacha/action-visual-snapshot@v2
with:
storage-prefix: 's3://linz-basemaps-screenshot'
storage-url: 'https://d25mfjh9syaxsr.cloudfront.net'