3 # This workflow uses actions that are not certified by GitHub.
4 # They are provided by a third-party and are governed by
5 # separate terms of service, privacy policy, and support
9 # Rebuild when changing the stable branch
14 # types: [published, created, edited]
19 runs-on: ubuntu-latest
25 - name: Checkout repository
26 uses: actions/checkout@v2
28 # Login against a Docker registry except on PR
29 # https://github.com/docker/login-action
30 - name: Log into registry ${{ env.REGISTRY }}
31 uses: docker/login-action@v1
33 username: ${{ secrets.DOCKERHUB_USERNAME }}
34 password: ${{ secrets.DOCKERHUB_TOKEN }}
39 make stable tuto-s4u tuto-smpi tuto-mc
40 docker push simgrid/stable
41 docker push simgrid/unstable
42 docker push simgrid/tuto-s4u
43 docker push simgrid/tuto-smpi
44 docker push simgrid/tuto-mc
45 - name: Create the failure Message
48 echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker images ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
49 - name: Create the success Message
52 echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker images built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
53 - uses: mattermost/action-mattermost-notify@master
55 MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
56 MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}