Skip to content

Commit 2308260

Browse files
authored
ci: run compare script once PR is ready (#2922)
1 parent 3214cc9 commit 2308260

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/svcaplbot-run-dyff.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: chart-deps compare output to main
33
on:
44
workflow_dispatch: ~
55
pull_request:
6-
types: [opened, synchronize, reopened]
6+
types: [opened, synchronize, reopened, ready_for_review]
77
paths:
88
- "charts/**"
99
- "values/**"
@@ -31,14 +31,22 @@ jobs:
3131
run: |
3232
COMMIT_MSG=$(git log -1 --pretty=%B)
3333
IS_DRAFT="${{ github.event.pull_request.draft }}"
34+
EVENT_ACTION="${{ github.event.action }}"
3435
3536
echo "Commit message: $COMMIT_MSG"
3637
echo "Is draft: $IS_DRAFT"
38+
echo "Event action: $EVENT_ACTION"
3739
38-
if [[ $COMMIT_MSG == "Merge branch"* || $IS_DRAFT == "true" ]]; then
39-
echo "skip=true" >> $GITHUB_OUTPUT
40+
if [[ $IS_DRAFT == "true" ]]; then
41+
echo "Skipping - PR is in draft"
42+
echo "skip=true" >> "$GITHUB_OUTPUT"
43+
elif [[ $COMMIT_MSG == "Merge branch"* && $EVENT_ACTION != "ready_for_review" ]]; then
44+
# Skip if merge commit, unless it is triggered by the ready_for_review event
45+
echo "Skipping - merge commit"
46+
echo "skip=true" >> "$GITHUB_OUTPUT"
4047
else
41-
echo "skip=false" >> $GITHUB_OUTPUT
48+
echo "Running workflow"
49+
echo "skip=false" >> "$GITHUB_OUTPUT"
4250
fi
4351
- name: Show output
4452
run: |

0 commit comments

Comments
 (0)