rc build status use secret webhook url
This commit is contained in:
31
.gitea/workflows/status.yaml
Normal file
31
.gitea/workflows/status.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
name: CI Build Status
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- CI
|
||||
types:
|
||||
- completed
|
||||
jobs:
|
||||
on-success:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Webhook
|
||||
uses: zzzze/webhook-trigger@master
|
||||
with:
|
||||
data: "{\"text\":\"${{ gitea.repository }} build succeeded 🎉\"}"
|
||||
webhook_url: ${{ secrets.BUILD_STATUS_NOTIFY_WEBHOOK_URL }}
|
||||
options: "-H \"Content-Type: application/json\""
|
||||
|
||||
on-failure:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
steps:
|
||||
- name: Webhook
|
||||
uses: zzzze/webhook-trigger@master
|
||||
with:
|
||||
data: "{\"text\":\"${{ gitea.repository }} build failed 🔎\"}"
|
||||
webhook_url: ${{ secrets.BUILD_STATUS_NOTIFY_WEBHOOK_URL }}
|
||||
options: "-H \"Content-Type: application/json\""
|
||||
Reference in New Issue
Block a user