diff --git a/.github/workflows/check-all-lint-rule-diffs.yaml b/.github/workflows/check-all-lint-rule-diffs.yaml index 0aac822..f22a752 100644 --- a/.github/workflows/check-all-lint-rule-diffs.yaml +++ b/.github/workflows/check-all-lint-rule-diffs.yaml @@ -13,7 +13,7 @@ jobs: name: Check diff runs-on: ubuntu-latest outputs: - has-diff: ${{ steps.output.outputs.has-diff }} + diff_count: ${{ steps.output.outputs.diff_count }} steps: - uses: actions/checkout@v4 - name: Set up Go @@ -23,22 +23,16 @@ jobs: cache-dependency-path: './diffscrape/go.sum' - name: Run go working-directory: ./diffscrape/cmd/rules - run: | - pwd - go run main.go - - uses: technote-space/get-diff-action@v6 - with: - FILES: | - all_lint_rules.yaml - - name: Output diff + run: go run main.go + - name: output diff id: output - run: echo "has-diff=${{ env.GIT_DIFF }}" >> "$GITHUB_OUTPUT" + run: echo "diff_count=$(git diff --name-only origin/${{ github.base_ref }} HEAD --relative=packages/altive_lints/lib | wc -l)" >> "$GITHUB_OUTPUT" commit: name: Commit diff runs-on: ubuntu-latest needs: [diff] - if: ${{ needs.diff.outputs.has-diff }} + if: ${{ needs.diff.outputs.diff_count != '0' }} steps: - uses: actions/checkout@v4 - name: Create branch