Skip to content

Commit

Permalink
infra: discord 웹훅 notify 조건 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
chansooo committed Jun 9, 2024
1 parent c8c0d4e commit fa749cd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/pullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,22 @@ jobs:
shell: bash -l {0}
run: mise exec -- tuist test PPACIOS-Workspace

- name: Set build status
- name: Set build status to success
if: ${{ success() }}
run: echo "BUILD_STATUS=success" >> $GITHUB_ENV
- name: Set build status

- name: Set build status to failure
if: ${{ failure() }}
run: echo "BUILD_STATUS=failure" >> $GITHUB_ENV

outputs:
build_status: ${{ steps.build_and_test.outcome }}

notify-success:
name: Notify Discord on Success
runs-on: ubuntu-latest
needs: build
if: ${{ needs.build.outputs.BUILD_STATUS == 'success' }}
if: success()
steps:
- name: Notify Discord
env:
Expand All @@ -61,11 +65,12 @@ jobs:
name: Notify Discord on Failure
runs-on: ubuntu-latest
needs: build
if: ${{ needs.build.outputs.BUILD_STATUS == 'failure' }}
if: always()
steps:
- name: Notify Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: "❌ Tests failed for PR: ${{ github.event.pull_request.title }}. PR URL: ${{ github.event.pull_request.html_url }}"

0 comments on commit fa749cd

Please sign in to comment.