Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Schultz <[email protected]>
  • Loading branch information
schultzp2020 committed Oct 22, 2024
1 parent d221ef0 commit 16fe00f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/update-changeset-prs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,22 @@ jobs:
name: Verify previous commit
runs-on: ubuntu-latest
outputs:
is-valid: ${{ steps.prev-commit.outputs.is-valid }}
valid: ${{ steps.prev-commit.outputs.valid }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
# Fetch the latest two commits
fetch-depth: 2

# We do not want an infinite loop; therefore, we are checking if the previous
# commit was created by this action.
- name: Get previous commit message
id: prev-commit
run: |
echo "is-valid=$(if [[ $(git log -1 --pretty=%B HEAD^) != 'chore: update yarn.lock' ]]; then echo 'true'; else echo 'false'; fi)" >> $GITHUB_OUTPUT
echo "valid=$(if [[ $(git log -1 --pretty=%B HEAD) != 'chore: update yarn.lock' ]]; then echo 'true'; else echo 'false'; fi)" >> $GITHUB_OUTPUT
update-and-commit-files:
name: Update and commit files
needs: prev-commit
if: needs.prev-commit.outputs.is-valid == 'true'
if: needs.prev-commit.outputs.valid == 'true'
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -58,3 +55,4 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: update yarn.lock'
file_pattern: yarn.lock

0 comments on commit 16fe00f

Please sign in to comment.