From: Augustin Degomme Date: Mon, 30 Aug 2021 16:09:28 +0000 (+0000) Subject: Add mattermost notification to docker action X-Git-Tag: v3.29~119 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/98456ab666ac171551452fdef0b2a7bf5c27e5b9 Add mattermost notification to docker action --- diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a1ae0340ae..7e5e2e257e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -36,3 +36,16 @@ jobs: make stable make all make push + - name: Create the failure Message + if: ${{ failure() }} + run: | + echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker images ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + - name: Create the success Message + if: ${{ success() }} + run: | + echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker images built and pushed successfully ! You can get it on: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + - uses: mattermost/action-mattermost-notify@master + env: + MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} + MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}} +