Skip to content

Commit 0648128

Browse files
authored
GH-47570: [CI] Don't notify nightly "CI: Extra" result from forks (#47571)
### Rationale for this change We need notifications only from apache/arrow. ### What changes are included in this PR? Use `--dry-run` on fork. ### Are these changes tested? No. ### Are there any user-facing changes? No. * GitHub Issue: #47570 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
1 parent 4630313 commit 0648128

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/cpp_extra.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ jobs:
278278
cmake --build cpp/examples/minimal_build.build
279279
cd cpp/examples/minimal_build
280280
../minimal_build.build/arrow-example
281-
281+
282282
report-extra-cpp:
283283
runs-on: ubuntu-latest
284284
needs:
@@ -301,6 +301,13 @@ jobs:
301301
python-version: 3
302302
- name: Setup Archery
303303
run: python3 -m pip install -e dev/archery[crossbow]
304+
- name: Prepare common options
305+
run: |
306+
if [ "${GITHUB_REPOSITORY}" = "apache/arrow" ]; then
307+
echo "COMMON_OPTIONS=--send" >> "${GITHUB_ENV}"
308+
else
309+
echo "COMMON_OPTIONS=--dry-run" >> "${GITHUB_ENV}"
310+
fi
304311
- name: Send email
305312
env:
306313
GH_TOKEN: ${{ github.token }}
@@ -310,12 +317,12 @@ jobs:
310317
--ignore ${{ github.job }} \
311318
--recipient-email '[email protected]' \
312319
--repository ${{ github.repository }} \
313-
--send \
314320
--sender-email '[email protected]' \
315321
--sender-name Arrow \
316322
--smtp-port 587 \
317323
--smtp-server 'commit-email.info' \
318324
--smtp-user arrow \
325+
${COMMON_OPTIONS} \
319326
${{ github.run_id }}
320327
- name: Send chat message
321328
if: always()
@@ -326,5 +333,5 @@ jobs:
326333
archery ci report-chat \
327334
--ignore ${{ github.job }} \
328335
--repository ${{ github.repository }} \
329-
--send \
336+
${COMMON_OPTIONS} \
330337
${{ github.run_id }}

0 commit comments

Comments
 (0)