-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use changed files action to get changesets
- Loading branch information
1 parent
87cc068
commit 915f548
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,12 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Fetch base | ||
run: git fetch origin ${{ github.event.pull_request.base.ref }} | ||
|
||
- name: Check for changeset file | ||
id: checkfile | ||
run: echo "{changeset}={$(git diff --name-only ${{ github.event.pull_request.base.ref }} | grep -c '.changeset/.*\.md$')} >> $GITHUB_OUTPUT" | ||
- name: Check for changesets | ||
id: changeset-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: .changeset/*.md | ||
base_sha: ${{ github.event.pull_request.base.sha }} | ||
|
||
- name: Find existing comment | ||
uses: peter-evans/[email protected] | ||
|
@@ -27,7 +27,7 @@ jobs: | |
|
||
- name: Update comment for found changeset | ||
uses: peter-evans/[email protected] | ||
if: steps.checkfile.outputs.changeset != '0' | ||
if: steps.changeset-files.outputs.any_changed == 'true' | ||
with: | ||
comment-id: ${{ steps.find_comment.outputs.comment-id }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
|
@@ -40,7 +40,7 @@ jobs: | |
|
||
- name: Update comment for missing changeset | ||
uses: peter-evans/[email protected] | ||
if: steps.checkfile.outputs.changeset == '0' | ||
if: steps.changeset-files.outputs.any_changed != 'true' | ||
with: | ||
comment-id: ${{ steps.find_comment.outputs.comment-id }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
|