Skip to content

Commit

Permalink
infra: discord 웹훅 action linux에서 작동하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chansooo committed Jun 9, 2024
1 parent dd45e76 commit c8c0d4e
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/pullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,35 @@ jobs:
shell: bash -l {0}
run: mise exec -- tuist test PPACIOS-Workspace

- name: Notify Discord on Success
- name: Set build status
if: ${{ success() }}
run: echo "BUILD_STATUS=success" >> $GITHUB_ENV
- name: Set build status
if: ${{ failure() }}
run: echo "BUILD_STATUS=failure" >> $GITHUB_ENV

notify-success:
name: Notify Discord on Success
runs-on: ubuntu-latest
needs: build
if: ${{ needs.build.outputs.BUILD_STATUS == 'success' }}
steps:
- name: Notify Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
if: ${{ success() }}
uses: Ilshidur/action-discord@master
with:
args: "✅ Tests passed for PR: ${{ github.event.pull_request.title }}. PR URL: ${{ github.event.pull_request.html_url }}"

- name: Notify Discord on Failure
notify-failure:
name: Notify Discord on Failure
runs-on: ubuntu-latest
needs: build
if: ${{ needs.build.outputs.BUILD_STATUS == 'failure' }}
steps:
- name: Notify Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
if: ${{ failure() }}
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 c8c0d4e

Please sign in to comment.