Wijzigingen koppeling Mattermost poging 2
Some checks failed
Docker Image CI / deploy (push) Blocked by required conditions
Docker Image CI / build-and-push (push) Has been cancelled

This commit is contained in:
2025-03-14 17:13:37 +01:00
parent 61ca3cce3b
commit e2c8f4088e

View File

@@ -24,13 +24,15 @@ jobs:
with: with:
name: version name: version
path: version.txt path: version.txt
- name: Notify Mattermost on start build - name: Notify Mattermost via Bot
run: | run: |
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer ${{ secrets.MATTERMOST_BOT_TOKEN }}" \ curl -X POST -H "Authorization: Bearer ${{ secrets.MATTERMOST_BOT_TOKEN }}" \
-H 'Content-Type: application/json' \
-d '{ -d '{
"channel": "build-notifications",
"text": "🚀 *Build gestart!* Een nieuwe build [${{VERSION}}-SNAPSHOT] is begonnen voor de repository *${{ gitea.repository }}* op branch *${{ gitea.ref }}*." "text": "🚀 *Build gestart!* Een nieuwe build [${{VERSION}}-SNAPSHOT] is begonnen voor de repository *${{ gitea.repository }}* op branch *${{ gitea.ref }}*."
}' \ }' \
https://mattermost.melvanveen.nl/hooks/gzzhdchjiirbmdfzyw1a9cf4sh https://mattermost.melvanveen.nl/api/v4/posts
# Stap 3: Inloggen bij Docker Hub # Stap 3: Inloggen bij Docker Hub
- name: Log in to Docker Hub - name: Log in to Docker Hub
@@ -90,11 +92,13 @@ jobs:
# Opruimen oude images # Opruimen oude images
docker image prune -f docker image prune -f
- name: Notify Mattermost on start build
run: |
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer ${{ secrets.MATTERMOST_BOT_TOKEN }}" \
-d '{
"text": "🚀 *Build is geslaagd!* Versie ${{VERSION}}-SNAPSHOT staat klaar op https://test-paypoint.melvanveen.nl"
}' \
https://mattermost.melvanveen.nl/hooks/gzzhdchjiirbmdfzyw1a9cf4sh
- name: Notify Mattermost via Bot
run: |
curl -X POST -H "Authorization: Bearer ${{ secrets.MATTERMOST_BOT_TOKEN }}" \
-H 'Content-Type: application/json' \
-d '{
"channel": "build-notifications",
"text": "✅ *Build is geslaagd!* Versie ${{VERSION}}-SNAPSHOT staat klaar op https://test-paypoint.melvanveen.nl"
}' \
https://mattermost.melvanveen.nl/api/v4/posts