summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoris Roovers <joris.roovers@gmail.com>2023-06-23 14:29:48 +0200
committerGitHub <noreply@github.com>2023-06-23 14:29:48 +0200
commit52478396c067e8e745cd385da65c81a33642fe7a (patch)
tree60f8c12207e908f4bed5e024ec406c24342db94b
parent2b95f4243a6dc1bcedb32e9b2ca14006a16caebb (diff)
GHA: Guard notify job from direct pushes to main (#515)
When directly pushing to main, don't try to post a comment on the releated PR (as no such PR will exist).
-rw-r--r--.github/workflows/ci.yml4
1 files changed, 3 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index abd2b73..a761291 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -277,4 +277,6 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
body: body
- }); \ No newline at end of file
+ });
+ # Don't run this step if there is no PR number, i.e. on a direct push to main
+ if: ${{ env.PR_NUMBER != '' }} \ No newline at end of file