Skip to content

Webhook url added

Webhook url added #7

name: release-notification
on:
pull_request:
branches:
- main
types:
- closed
workflow_dispatch:
env:
PR_NUMBER: ${{ github.event.number }}
CC_SLACK_WEBHOOK: ${{ secrets.CC_SLACK_WEBHOOK }}
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
environment: cc-test-release
steps:
- name: Print Body
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: echo "$PR_BODY"
- name: Send Slack Notification
uses: actions/github-script@v7
with:
github-token: ${{ steps.milo-pr-merge-token.outputs.token }}
script: |
const sendSlackMessage = require('./.github/workflows/send-slack.js')
sendSlackMessage(github.event.pull_request.body,process.env.CC_SLACK_WEBHOOK)