@@ -75,15 +75,19 @@ jobs:
75
75
echo "SERIES_DIR=/tmp/series" >> $GITHUB_ENV
76
76
77
77
- name : Check for label 'no-ml' to skip sending emails
78
+ id : checklabel
78
79
run : |
79
80
# Skip if PR has label "no-ml"
80
81
if echo "$PR_LABELS" | grep -qiE "(^|,)no-ml(,|$)"; then
81
82
echo "Opt-out label present: skipping mailing list." | tee $GITHUB_STEP_SUMMARY
82
- exit 0
83
+ echo "skip_sending=1" >> $GITHUB_OUTPUT
84
+ else
85
+ echo "skip_sending=0" >> $GITHUB_OUTPUT
83
86
fi
84
87
85
88
- name : Get commit list from PR and skip the internal ones
86
89
id : commits
90
+ if : ${{ steps.checklabel.outputs.skip_sending != '1' }}
87
91
run : |
88
92
# Skip commits that touches any of these
89
93
patterns=(".github/"
@@ -120,14 +124,16 @@ jobs:
120
124
echo "COUNT=$COUNT" >> $GITHUB_ENV
121
125
122
126
- name : Check what to do based on series' size
127
+ if : ${{ hashFiles('/tmp/commits') != '' }}
128
+ id : checksize
123
129
run : |
124
130
MAX=150
125
131
if [ "${COUNT}" -gt "$MAX" ]; then
126
132
echo "Series has $COUNT commits (> $MAX). Not doing anything" | tee $GITHUB_STEP_SUMMARY
127
- exit 0
128
133
fi
129
134
130
135
- name : Prepare patch series
136
+ if : ${{ hashFiles('/tmp/commits') != '' }}
131
137
run : |
132
138
set -euo pipefail
133
139
@@ -184,6 +190,7 @@ jobs:
184
190
done < <(find /tmp/series/ -maxdepth 1 -type f -print0|sort -z -n)
185
191
186
192
- name : Send series via git send-email
193
+ if : ${{ hashFiles('/tmp/commits') != '' }}
187
194
env :
188
195
GIT_SMTP_SERVER : ${{ secrets.SMTP_SERVER }}
189
196
GIT_SMTP_ENCRYPTION : tls
0 commit comments