Skip to content

Notify PR Completion #11

Notify PR Completion

Notify PR Completion #11

Workflow file for this run

name: Notify PR Completion
on:
workflow_run:
workflows: [Deployment]
types: [completed]
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Notify current workflow is succeed
uses: actions/github-script@v6
if: success()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: ${{ github.event.pull_request.number }},
owner: 'ghkdqhrbals',
repo: 'spring-chatting-server',
body: '✅ Build & Test workflow succeed ✅\n- [Show details](https://github.com/ghkdqhrbals/spring-chatting-server/actions/runs/${{ github.run_id }})'
})
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Notify current workflow is failed
uses: actions/github-script@v6
if: failure()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: ${{ github.event.pull_request.number }},
owner: 'ghkdqhrbals',
repo: 'spring-chatting-server',
body: '❌ Build & Test workflow failed ❌\n- [Show details](https://github.com/ghkdqhrbals/spring-chatting-server/actions/runs/${{ github.run_id }})'
})