diff --git a/.github/workflows/semver_checks.yml b/.github/workflows/semver_checks.yml index 3e1e852767..7aaedbd16b 100644 --- a/.github/workflows/semver_checks.yml +++ b/.github/workflows/semver_checks.yml @@ -36,6 +36,7 @@ jobs: timeout-minutes: 30 outputs: exitcode: ${{ steps.semver-pr-check.outputs.exitcode }} + output: ${{ steps.semver-pr-check.outputs.output }} steps: - name: Checkout uses: actions/checkout@v3 @@ -58,8 +59,10 @@ jobs: id: semver-pr-check run: | set +e - make semver-rev rev="$PR_BASE" - exitcode=$? + echo "output<> $GITHUB_OUTPUT + make semver-rev rev="$PR_BASE" |& tee -a $GITHUB_OUTPUT + exitcode=${PIPESTATUS[0]} + echo "SEMVER_STDOUT_EOF" >> $GITHUB_OUTPUT echo "exitcode=$exitcode" >> $GITHUB_OUTPUT exit "$exitcode" continue-on-error: true @@ -84,6 +87,24 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_REPO: ${{ github.repository }} + - name: Post report on semver break + run: | + gh pr comment "$PR_ID" --body "\ + \`cargo semver-checks\` detected some API incompatibilities in this PR. + See the following report for details: +
+ cargo semver-checks output + \`\`\` + $SEMVER_OUTPUT + \`\`\` +
+ " + if: needs.semver-pull-request-check.outputs.exitcode != '0' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + SEMVER_OUTPUT: ${{ needs.semver-pull-request-check.outputs.output }} + semver-push-tag: runs-on: ubuntu-latest