Skip to content

Commit 839bde7

Browse files
fix(ci): Ensure CodeQL comment workflow only runs on success
The 'CodeQL - Post Comment' workflow was failing intermittently because it would attempt to download an artifact that was not always present. This occurred when the upstream 'CodeQL Analysis' workflow did not produce the artifact, for example, when it failed or when no new alerts were found. This change modifies the trigger condition for the 'post-comment' job to only run when the upstream 'CodeQL Analysis' workflow has a conclusion of 'success'. This ensures that the artifact is guaranteed to exist, resolving the recurring failures.
1 parent 3e74780 commit 839bde7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/codeql-comment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
jobs:
1414
post-comment:
1515
runs-on: ubuntu-latest
16-
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion != 'cancelled'
16+
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
1717
steps:
1818
- name: Download PR comment data
1919
uses: actions/download-artifact@fa0a91b85d4f404e8442c7c958156baef1102941 # v4.1.8

0 commit comments

Comments
 (0)