Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Send notification to chat when docker build was successful (#4446)

Cenk Kücük4b6d8b68599b
diff --git a/.github/workflows/build-private-images-ghcr.yml b/.github/workflows/build-private-images-ghcr.yml
index 89ed37bee1..7bcabb63ed 100644
--- a/.github/workflows/build-private-images-ghcr.yml
+++ b/.github/workflows/build-private-images-ghcr.yml
@@ -68,3 +68,12 @@ jobs:
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"content": "<a href=\"https://github.com/plausible/analytics/actions/workflows/build-private-images.yml\">Build failed</a>"}'
+
+ - name: Notify team on success
+ if: ${{ success() && github.ref == 'refs/heads/master' }}
+ uses: fjogeleit/http-request-action@v1
+ with:
+ url: ${{ secrets.BUILD_NOTIFICATION_URL }}
+ method: 'POST'
+ customHeaders: '{"Content-Type": "application/json"}'
+ data: '{"content": "<h1>:rocket: New changes are deployed to production!</h1><br/><h3>:worker: Author: ${{ github.actor }}</h3><br/><p>:writing_hand: Commit message: ${{ github.event.head_commit.message }}</p><br/>"}'
\ No newline at end of file