Skip to content

Commit

Permalink
fix: use changed files action to get changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
agierlicki committed Jan 21, 2025
1 parent 87cc068 commit 915f548
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/template_changeset_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 17 in .github/workflows/template_changeset_check.yml

View workflow job for this annotation

GitHub Actions / yamllint / yamllint

trailing spaces (trailing-spaces)
base_sha: ${{ github.event.pull_request.base.sha }}

- name: Find existing comment
uses: peter-evans/[email protected]
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down

0 comments on commit 915f548

Please sign in to comment.