From 36546674947ad7e955d9817d9b4136f4e2475b80 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Fri, 3 May 2024 11:16:19 -0700 Subject: [PATCH] Add startup and completion messages Adding discord webhooks to ci/cd --- .gitea/workflows/build-and-push.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml index b7867824..83c38c22 100755 --- a/.gitea/workflows/build-and-push.yaml +++ b/.gitea/workflows/build-and-push.yaml @@ -3,6 +3,15 @@ run-name: ${{ gitea.actor }} Triggered a new run 🚀 on: [push] jobs: + post-startup-message: + runs-on: ubuntu-latest + steps: + - uses: sarisia/actions-status-discord@v1 + if: always() + with: + title: "Pipeline is starting" + webhook: ${{ secrets.DISCORD_WEBHOOK }} + avatar_url: "https://git.luker.fr/assets/img/logo.svg" detect-changed-files: runs-on: ubuntu-latest outputs: @@ -76,3 +85,15 @@ jobs: version: 2.6.7 command: app options: --insecure --server 192.168.1.205 --auth-token ${{ secrets.ARGOCD_TOKEN }} set dragon-bot --helm-set image.tag=${{ gitea.run_id }} + + post-finish-message: + runs-on: ubuntu-latest + if: ${{ (steps.Build-and-Push-Docker.outcome == 'success') }} + steps: + - uses: sarisia/actions-status-discord@v1 + if: always() + with: + title: "Pipeline has completed successfully" + status: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + avatar_url: "https://git.luker.fr/assets/img/logo.svg" \ No newline at end of file