Skip to content

frontend-changes

frontend-changes #5

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
steps:
- name: Notify Slack about Frontend Changes
if: ${{ github.event.action == '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: ${{ github.event.head_commit.message }}",
"icon_emoji": ":octocat:",
"attachments": [{
"color": "#f4e242",
"fields": [{
"title": "Commit",
"value": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>",
"short": true
},{
"title": "Author",
"value": "${{ github.actor }}",
"short": true
},{
"title": "Message",
"value": "${{ github.event.head_commit.message }}",
"short": false
}]
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_FRONTEND_URL }}
notifySlackBackend:
runs-on: ubuntu-latest
steps:
- name: Notify Slack about Backend Changes
if: ${{ github.event.action == '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: ${{ github.event.head_commit.message }}",
"icon_emoji": ":octocat:",
"attachments": [{
"color": "#42e2f4",
"fields": [{
"title": "Commit",
"value": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>",
"short": true
},{
"title": "Author",
"value": "${{ github.actor }}",
"short": true
},{
"title": "Message",
"value": "${{ github.event.head_commit.message }}",
"short": false
}]
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}