Skip to content

Commit

Permalink
ci: set continue-on-error to false in pr-title-checker action (#496)
Browse files Browse the repository at this point in the history
* ci: set continue-on-error to false in pr-title-checker action

Signed-off-by: Lin Yang <[email protected]>

* feat: improve the workflow

Signed-off-by: Lin Yang <[email protected]>

* feat: improve the workflow

Signed-off-by: Lin Yang <[email protected]>

---------

Signed-off-by: Lin Yang <[email protected]>
(cherry picked from commit 76b43e6)
  • Loading branch information
reaver-flomesh authored and github-actions[bot] committed Dec 2, 2024
1 parent 9b67414 commit 88ebdea
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/pr-title-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@ jobs:
- name: PR Title Check
uses: thehanimo/[email protected]
id: check
continue-on-error: true
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: ".github/pr-title-checker-config.json"

fail:
name: PR Title Check Failed
runs-on: ubuntu-latest
if: ${{ always() && steps.check.outputs.success == 'false'}}
steps:
- name: Add comment to fix PR title
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ steps.check.outputs.success == 'false'}}
id: comment-fail
with:
header: 'PR Title Check'
recreate: true
Expand All @@ -47,15 +51,21 @@ jobs:
* `feat: add new feature AB#789`
* `chore: fixing build pipeline` - no AB reference
* `build(deps): bump BlahBlah from 1.0 to 1.1`
* `[WIP] feat: add new feature AB#123`
* `[CHERRY-PICK] fix: fix typo in README.md AB#123`
* `[BACKPORT] fix: fix typo in README.md AB#123`
* `[wip] feat: add new feature AB#123`
* `[cherry-pick] fix: fix typo in README.md AB#123`
* `[backport] fix: fix typo in README.md AB#123`
For more details, please refer to the [Conventional Commits Specification](https://www.conventionalcommits.org/en/v1.0.0)
and the [PR Title Configuration File](.github/pr-title-checker-config.json).
- name: Set action status to failed
run: exit 1

success:
name: PR Title Check Passed
runs-on: ubuntu-latest
if: ${{ always() && steps.check.outputs.success == 'true'}}
steps:
- name: Add comment that PR title is fixed
if: ${{ steps.check.outputs.success == 'true'}}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: 'PR Title Check'
Expand Down

0 comments on commit 88ebdea

Please sign in to comment.