name: ABI Compatibility on: workflow_run: workflows: ["ABI Compatibility Build"] types: [completed] permissions: {} jobs: abi-diff: permissions: pull-requests: write name: ABI - Difference if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }} runs-on: ubuntu-latest steps: - name: Download abi-head uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: abi-head path: abi-head run-id: ${{ github.event.workflow_run.id }} github-token: ${{ secrets.GITHUB_TOKEN }} - name: Download abi-base uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: abi-base path: abi-base run-id: ${{ github.event.workflow_run.id }} github-token: ${{ secrets.GITHUB_TOKEN }} - name: Setup ApiCompat run: | dotnet tool install --global Microsoft.DotNet.ApiCompat.Tool - name: Run ApiCompat id: diff run: | { echo 'body<> $GITHUB_OUTPUT - name: Find difference comment uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-comment with: issue-number: ${{ github.event.workflow_run.pull_requests[0].number }} direction: last body-includes: abi-diff-workflow-comment - name: Reply or edit difference comment (changed) uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 if: ${{ steps.diff.outputs.body != '' }} with: issue-number: ${{ github.event.workflow_run.pull_requests[0].number }} comment-id: ${{ steps.find-comment.outputs.comment-id }} edit-mode: replace token: ${{ secrets.JF_BOT_TOKEN }} body: |
ABI Difference ``` ${{ steps.diff.outputs.body }} ```
- name: Reply or edit difference comment (unchanged) uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 if: ${{ steps.diff.outputs.body == '' && steps.find-comment.outputs.comment-id != '' }} with: issue-number: ${{ github.event.workflow_run.pull_requests[0].number }} comment-id: ${{ steps.find-comment.outputs.comment-id }} edit-mode: replace token: ${{ secrets.JF_BOT_TOKEN }} body: |
ABI Difference No changes to the ABI found. See history of this comment for previous changes.