Skip to content

Commit

Permalink
fixup! feat(vrt): baseブランチの差分と比較できるように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mii288 committed Dec 13, 2024
1 parent 935698d commit 2b9367b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/actions/screenshots/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
outputs:
cache-key:
description: the cache key name
value: vrt-${{ steps.latest-commit.outputs.sha }}
value: ${{ steps.cache.outputs.key }}

runs:
using: composite
Expand All @@ -22,18 +22,21 @@ runs:
with:
ref: ${{ inputs.ref }}
clean: false
- name: Check latest commit hash
id: latest-commit
- name: Set cache key
id: cache
run: |
# `git rev-parse HEAD`実行時にwarningが発生する問題の対応策
git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
# テストケース自体に変更がある場合はキャッシュを使わず、スクリーンショットを撮影し直す
echo "key=vrt-$(git rev-parse HEAD)-${{ hashFiles('playwright.config.ts', 'tests/vrt.spec.ts') }}" >> "$GITHUB_OUTPUT"
shell: bash
- name: Restore screenshots
id: vrt-screenshots
uses: actions/cache@v4
with:
path: ${{ inputs.path }}
key: vrt-${{ steps.latest-commit.outputs.sha }}
key: ${{ steps.cache.outputs.key }}
- if: ${{ steps.vrt-screenshots.outputs.cache-hit != 'true' }}
name: Install Japanese fonts
run: |
Expand Down

0 comments on commit 2b9367b

Please sign in to comment.