Skip to content

Commit

Permalink
chore(ci): comment on pull requests about semver checks
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Mar 11, 2024
1 parent 830528c commit ccdc152
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
schedule:
- cron: "0 0 * * 0"

permissions:
pull-requests: write

jobs:
check:
name: Check
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ccdc152

Please sign in to comment.