-
Notifications
You must be signed in to change notification settings - Fork 40
36 lines (34 loc) · 950 Bytes
/
update_snapshot.yml
File metadata and controls
36 lines (34 loc) · 950 Bytes
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
name: Update snapshot
on:
workflow_dispatch:
push:
branches:
- 'dependabot/**'
issue_comment:
types: [created]
permissions:
contents: write
jobs:
update:
if: >
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
(github.event.issue.pull_request && contains(github.event.comment.body, '/update-snapshot'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || '' }}
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: "22.x"
- run: |
npm ci
npm run test -- -u
working-directory: ./cdk
- name: Add & Commit
uses: EndBug/add-and-commit@v7.2.0
with:
add: "cdk/test/__snapshots__/."
message: "update snapshot"