Skip to content

[Fix] workflow 및 컨테이너 빌드 설정 수정 - #56 #153

[Fix] workflow 및 컨테이너 빌드 설정 수정 - #56

[Fix] workflow 및 컨테이너 빌드 설정 수정 - #56 #153

Workflow file for this run

name: Notify Discord of GitHub activity
on:
discussion:
types: [ created, answered ]
discussion_comment:
pull_request:
types: [ opened, reopened, closed ]
branches: [ main, dev ]
issue_comment:
types: [ created ]
issues:
types: [ opened, deleted, closed, reopened ]
release:
types: [ published ]
# Add other events here that you want to trigger the workflow on
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3
- name: Install dependencies
run: pip install requests
- name: Process webhook payload and notify Discord
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
payload=$(cat $GITHUB_EVENT_PATH)
event_type=$(jq -r ".\"${{ github.event_name }}\"" <<< $payload)
repository_name=$(jq -r '.repository.name' <<< $payload)
sender_username=$(jq -r '.sender.login' <<< $payload)
message="New event on $repository_name by $sender_username! <@&1048243413033697310>"
payload=$(jq --arg message "$message" '. + {content: $message}' <<< $payload)
curl -H "Content-Type: application/json" -X POST -d "$payload" $DISCORD_WEBHOOK_URL