mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: 'Update Reference Screenshots'
|
|
description: 'Update Reference Screenshots'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 16.x
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
path: ./artifacts
|
|
- name: Extract Archives
|
|
# This finds all .zip files in the ./artifacts
|
|
# directory, including nested directories.
|
|
# It then unzips every .zip to the root directory
|
|
run: |
|
|
find . -type f -name 'UpdatedScreenshots-*.zip' -exec unzip -q -o -d ../ {} \;
|
|
shell: bash
|
|
working-directory: ./artifacts
|
|
- name: Push Screenshots
|
|
# Configure user as Ionitron
|
|
# and push only the changed .png snapshots
|
|
# to the remote branch.
|
|
# Screenshots are in .gitignore
|
|
# to prevent local screenshots from getting
|
|
# pushed to Git. As a result, we need --force
|
|
# here so that CI generated screenshots can
|
|
# get added to git. Screenshot ground truths
|
|
# should only be added via this CI process.
|
|
run: |
|
|
git config user.name ionitron
|
|
git config user.email hi@ionicframework.com
|
|
git add src/\*.png --force
|
|
git commit -m "chore(): add updated snapshots"
|
|
git push
|
|
shell: bash
|
|
working-directory: ./core
|