diff --git a/.github/workflows/notifications.yml b/.github/workflows/notifications.yml index c8a84bf3d..e06c5116b 100644 --- a/.github/workflows/notifications.yml +++ b/.github/workflows/notifications.yml @@ -6,11 +6,11 @@ on: - completed jobs: notify-teams-pr: - if: ${{github.event.workflow_run.event == 'pull_request' && vars.MS_TEAMS_WEBHOOK_URI}} + if: ${{github.event.workflow_run.event == 'pull_request' && vars.MS_TEAMS_WEBHOOK_URI != null}} runs-on: ubuntu-24.04 steps: - uses: simbo/msteams-message-card-action@latest - if: ${{ vars.MS_TEAMS_WEBHOOK_URI }} + if: ${{ vars.MS_TEAMS_WEBHOOK_URI != null}} with: webhook: ${{ vars.MS_TEAMS_WEBHOOK_URI }} title: "${{github.event.workflow_run.head_commit.message}}" @@ -27,11 +27,11 @@ jobs: image: ${{github.event.workflow_run.head_repository.owner.avatar_url}} text: PR Opened notify-teams-merged: - if: ${{github.event.workflow_run.event == 'push' && vars.MS_TEAMS_WEBHOOK_URI}} + if: ${{github.event.workflow_run.event == 'push' && vars.MS_TEAMS_WEBHOOK_URI != null}} runs-on: ubuntu-24.04 steps: - name: PR Number - if: ${{ vars.MS_TEAMS_WEBHOOK_URI }} + if: ${{ vars.MS_TEAMS_WEBHOOK_URI != null }} id: pr shell: bash run: | @@ -50,7 +50,7 @@ jobs: - uses: simbo/msteams-message-card-action@latest if: ${{ vars.MS_TEAMS_WEBHOOK_URI }} with: - webhook: ${{ vars.MS_TEAMS_WEBHOOK_URI }} + webhook: ${{ vars.MS_TEAMS_WEBHOOK_URI != null }} title: "${{github.event.workflow_run.head_commit.message}}" message: "${{github.event.workflow_run.head_commit.message}}" color: 'dark orange'