diff --git a/.github/workflows/slack-alarm.yml b/.github/workflows/slack-alarm.yml new file mode 100644 index 0000000..7442f0e --- /dev/null +++ b/.github/workflows/slack-alarm.yml @@ -0,0 +1,21 @@ +name: Slack Alarm + +on: + pull_request: + branches: [ "main", "dev" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: action-slack + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK}} + PR_TITLE: ${{ github.event.pull_request.title }} + PR_BODY: ${{ github.event.pull_request.body }} + PR_USER: ${{ github.event.pull_request.user.login }} + PR_URL: ${{ github.event.pull_request.html_url }} + run: | + curl -X POST -H 'Content-type: application/json' --data '{ + "text": "*New Frontend PR!*\n>*Title*: ${PR_TITLE}\n>*User*: ${PR_USER}\n>*URL*: ${PR_URL}\n>*Description*: ${PR_BODY}" + }' $SLACK_WEBHOOK_URL \ No newline at end of file