Skip to content

Infra/discord webhook 설정 #24

Infra/discord webhook 설정

Infra/discord webhook 설정 #24

Workflow file for this run

# .github/workflows/my-project.yml
name: PPAC
on:
pull_request:
branches: [ develop ]
jobs:
build:
name: test action
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Access Available
run: chmod +x Scripts/onboarding.sh
- name: Install Setup Script and Fetch Dependencies
run: ./Scripts/onboarding.sh
- name: Source bashrc
shell: bash -l {0}
run: source ~/.bashrc && mise doctor
- name: Install tuist
shell: bash -l {0}
run: mise install
- name: Install dependencies
shell: bash -l {0}
run: mise exec -- tuist install
- name: Build and Test
id: build_and_test
shell: bash -l {0}
run: mise exec -- tuist test PPACIOS-Workspace
- name: Set build status to success
if: ${{ success() }}
run: echo "BUILD_STATUS=success" >> $GITHUB_ENV
- 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: success()
steps:
- name: Notify Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: "✅ PR Build Tests passed for \nPR: ${{ github.event.pull_request.title }}. \nPR URL: ${{ github.event.pull_request.html_url }}"
notify-failure:
name: Notify Discord on Failure
runs-on: ubuntu-latest
needs: build
if: failure()
steps:
- name: Notify Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: "❌ PR Build Tests failed for \nPR: ${{ github.event.pull_request.title }}.\nPR URL: ${{ github.event.pull_request.html_url }}"