Github actions

This commit is contained in:
Jarred Sumner
2024-05-16 01:47:33 -07:00
parent f00772e98d
commit c3d4e2729f
2 changed files with 8 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ on:
jobs:
comment-lint:
if: ${{ github.repository_owner == 'oven-sh' && github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.repository_owner == 'oven-sh' }}
name: Comment
runs-on: ubuntu-latest
steps:
@@ -62,13 +62,14 @@ jobs:
comment-id: ${{ steps.comment.outputs.comment-id }}
issue-number: ${{ steps.env.outputs.pr-number }}
body: |
@${{ github.actor }}, C++ linting failed!
@${{ github.actor }}, `clang-tidy` had something to share with you about your code:
Logs:
```cpp
${{ steps.env.outputs.text_output }}
```
Commit: ${{ github.event.workflow_run.head_sha || github.sha }}
<!-- generated-comment lint-cpp-workflow=${{ github.workflow }} -->
edit-mode: replace
- name: Update Previous Comment
@@ -78,7 +79,7 @@ jobs:
comment-id: ${{ steps.comment.outputs.comment-id }}
issue-number: ${{ steps.env.outputs.pr-number }}
body: |
@${{ github.actor }}, C++ lint errors fixed! Thank you.
@${{ github.actor }}, you fixed the clang-tidy nits! Thank you.
<!-- generated-comment lint-cpp-workflow=${{ github.workflow }} -->
edit-mode: replace

View File

@@ -79,3 +79,6 @@ jobs:
with:
name: did_fail.txt
path: did_fail.txt
- name: Fail if formatting failed
if: ${{ steps.format.outputs.did_fail == '1' }}
run: exit 1