diff --git a/.github/workflows/check_interface_compatibility.yml b/.github/workflows/check_compatibility.yml similarity index 53% rename from .github/workflows/check_interface_compatibility.yml rename to .github/workflows/check_compatibility.yml index 205397376a..e669fe49ae 100644 --- a/.github/workflows/check_interface_compatibility.yml +++ b/.github/workflows/check_compatibility.yml @@ -1,11 +1,8 @@ -name: Check interface compatibility +name: Check compatibility on: pull_request: -permissions: - pull-requests: write - jobs: check-interface-compatibility: runs-on: ubuntu-latest @@ -47,35 +44,8 @@ jobs: exit_code=0 output=$(bin/public_interface.py check "${{ runner.temp }}"/interfaces.original.json "${{ runner.temp }}"/interfaces.new.json) || exit_code=$? - # Show the output in job summary - echo "$output" >> $GITHUB_STEP_SUMMARY - - # Update steps.detect.outputs.change_detected=true for next steps if [ "$exit_code" -ne 0 ]; then - echo "change_detected=true" >> $GITHUB_OUTPUT + # Show the output in job summary and fail the workflow + echo "$output" >> $GITHUB_STEP_SUMMARY + exit 1 fi - - # Save the output for next step to process it, - # and saving it into a file can avoid the need of escaping in github-script. - echo "$output" > "${{ runner.temp }}"/output.md - - - name: Post GitHub PR comment - if: ${{ steps.detect.outputs.change_detected }} - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const fs = require('fs'); - const output = fs.readFileSync('${{ runner.temp }}/output.md', 'utf8') - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: output - }) - - - name: Show detection output - if: ${{ steps.detect.outputs.change_detected }} - run: | - cat "${{ runner.temp }}"/output.md - exit 1