mirror of
https://github.com/astefanutti/decktape.git
synced 2024-09-17 17:37:13 +03:00
35 lines
1.0 KiB
YAML
35 lines
1.0 KiB
YAML
name: Update Snapshots
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- run: npm ci
|
|
- run: npx playwright install firefox
|
|
- run: npm run test:generate-pdfs
|
|
- run: rm -rf test/snapshot && mv test/output test/snapshot
|
|
- name: Commit
|
|
run: |
|
|
git config --global user.name 'Decktape bot'
|
|
git config --global user.email 'decktape-bot@users.noreply.github.com'
|
|
git pull
|
|
git add .
|
|
git commit -m "test: update snapshot PDFs"
|
|
git push
|
|
- name: Trigger CI Workflow
|
|
uses: actions/github-script@v6
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
github.rest.actions.createWorkflowDispatch({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
workflow_id: 'ci.yml',
|
|
ref: '${{ github.ref }}',
|
|
})
|