Skip to content

Commit

Permalink
Merge pull request #284 from takahirom/ci-compare-with-base-branch
Browse files Browse the repository at this point in the history
[CI]Compare with base branch
  • Loading branch information
takahirom authored Mar 27, 2024
2 parents 831a45d + c92aad6 commit d681e86
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/CompareScreenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ jobs:
actions: write # for upload-artifact

steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Checkout base branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.base_ref }}
- name: Set up JDK 17
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
Expand All @@ -31,14 +32,19 @@ jobs:
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
with:
gradle-version: wrapper
- name: Get base branch HEAD commit
id: get_base_branch_head
run: echo "sha=$(git rev-parse origin/${{ github.base_ref }})" >> "$GITHUB_OUTPUT"

- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- uses: dawidd6/action-download-artifact@v2
continue-on-error: true
with:
name: screenshot
workflow: StoreScreenshot.yml
branch: main
commit: ${{ steps.get_base_branch_head.outputs.sha }}

- name: compare screenshot test
id: compare-screenshot-test
Expand Down Expand Up @@ -78,4 +84,4 @@ jobs:
- uses: actions/upload-artifact@v2
with:
name: pr
path: pr/
path: pr/

0 comments on commit d681e86

Please sign in to comment.