Skip to content

Commit 0f8a1d5

Browse files
committed
Add condition to team notification of github actions that it's from 'main'
PiperOrigin-RevId: 893437916 Change-Id: I0c0b22747e4e4cac23ad0f44cf8b667863cc79ae
1 parent b3b0bd6 commit 0f8a1d5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ jobs:
347347
CHATMSG_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
348348
CHATMSG_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
349349
CHATMSG_JOB_ID: ${{ matrix.label }}
350-
if: failure() && github.event_name == 'push' && env.GCHAT_API_URL != '' && github.ref_name == 'main'
350+
if: failure() && github.ref_name == 'main' && github.event_name == 'push' && env.GCHAT_API_URL != ''
351351
run: bash ./.github/workflows/build_steps.sh notify_team_chat
352352

353353
# This job quickly determines if MuJoCo Studio is broken.
@@ -406,7 +406,7 @@ jobs:
406406
CHATMSG_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
407407
CHATMSG_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
408408
CHATMSG_JOB_ID: ${{ matrix.label }}
409-
if: failure() && github.event_name == 'push' && env.GCHAT_API_URL != '' && github.ref_name == 'main'
409+
if: failure() && github.ref_name == 'main' && github.event_name == 'push' && env.GCHAT_API_URL != ''
410410
run: bash ./.github/workflows/build_steps.sh notify_team_chat
411411

412412

@@ -451,5 +451,5 @@ jobs:
451451
CHATMSG_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
452452
CHATMSG_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
453453
CHATMSG_JOB_ID: ${{ env.label }}
454-
if: failure() && github.event_name == 'push' && env.GCHAT_API_URL != '' && github.ref_name == 'main'
454+
if: failure() && github.ref_name == 'main' && github.event_name == 'push' && env.GCHAT_API_URL != ''
455455
run: bash ./.github/workflows/build_steps.sh notify_team_chat

0 commit comments

Comments
 (0)