diff --git a/.github/workflows/pocketbase-typegen.yml b/.github/workflows/pocketbase-typegen.yml index f656967..1dd0c99 100644 --- a/.github/workflows/pocketbase-typegen.yml +++ b/.github/workflows/pocketbase-typegen.yml @@ -11,6 +11,7 @@ jobs: name: Generate pocketbase types runs-on: ubuntu-latest outputs: + # https://github.com/orgs/community/discussions/25280 commit_changes: ${{ steps.check_changes.outputs.commit_changes }} steps: - name: Checkout code @@ -33,9 +34,9 @@ jobs: - name: Check for changes id: check_changes - # https://github.com/orgs/community/discussions/25280 run: | - if git diff --quiet; then + # https://stackoverflow.com/a/62213712 + if [ $(git status --porcelain | wc -l ) -gt 0 ]; then echo 'commit_changes=true' >> $GITHUB_OUTPUT else echo 'commit_changes=false' >> $GITHUB_OUTPUT