diff --git a/.gitea/workflows/status.yaml b/.gitea/workflows/status.yaml new file mode 100644 index 0000000..c703766 --- /dev/null +++ b/.gitea/workflows/status.yaml @@ -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\""