diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f300365522..e1287ed2a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,9 @@ on: schedule: - cron: "0 0 * * 0" +permissions: + pull-requests: write + jobs: check: name: Check @@ -46,9 +49,29 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Check semver + id: check_semver uses: obi1kenobi/cargo-semver-checks-action@v2 with: package: git-cliff-core + - name: Comment on PR + if: always() && (steps.check_semver.outputs.error_message != null) && (github.event_name == 'pull_request') + uses: marocchino/sticky-pull-request-comment@v2 + with: + header: pr-semver-check-error + message: | + Thank you for opening this pull request! ⛰️ + + There seems to be semver incompatibility issues reported by [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks). + + Details: + + > ${{ steps.check_semver.outputs.error_message }} + - name: Update comment on PR + uses: marocchino/sticky-pull-request-comment@v2 + if: (steps.check_semver.outputs.error_message == null) && (github.event_name == 'pull_request') + with: + header: pr-semver-check-error + delete: true test: name: Test suite