Skip to content

backend-changes

backend-changes #71

Workflow file for this run

name: Notify Slack on Changes
on:
repository_dispatch:
types: [frontend-changes, backend-changes]
workflow_dispatch:
jobs:
notifySlackFrontend:
runs-on: ubuntu-latest
if: ${{ github.event.action == 'frontend-changes' }}
steps:
- name: Notify Slack about Frontend Changes
uses: 8398a7/action-slack@v3
with:
status: custom
fields: repo,message,commit,author,action
custom_payload: |
{
"channel": "#프론트엔드",
"username": "GitHub",
"text": "A new commit has been pushed to `frontend/` on the `main` branch",
"icon_emoji": ":octocat:",
"attachments": [{
"color": "#f4e242",
"fields": [{
"title": "Commit",
"value": "<https://github.com/${{ github.repository }}/commit/${{ github.event.client_payload.sha }}|${{ github.event.client_payload.sha }}>",
"short": true
},{
"title": "Author",
"value": "${{ github.actor }}",
"short": true
},{
"title": "Message",
"value": "${{ github.event.client_payload.commit_message }}",
"short": false
}]
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_FRONTEND_URL }}
notifySlackBackend:
runs-on: ubuntu-latest
if: ${{ github.event.action == 'backend-changes' }}
steps:
- name: Notify Slack about Backend Changes
uses: 8398a7/action-slack@v3
with:
status: custom
fields: repo,message,commit,author,action
custom_payload: |
{
"channel": "#백엔드",
"username": "GitHub",
"text": "A new commit has been pushed to `backend/` on the `main` branch",
"icon_emoji": ":octocat:",
"attachments": [{
"color": "#42e2f4",
"fields": [{
"title": "Commit",
"value": "<https://github.com/${{ github.repository }}/commit/${{ github.event.client_payload.sha }}|${{ github.event.client_payload.sha }}>",
"short": true
},{
"title": "Author",
"value": "${{ github.actor }}",
"short": true
},{
"title": "Message",
"value": "${{ github.event.client_payload.commit_message }}",
"short": false
}]
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}