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
16 runs-on: ubuntu-latest
22 - name: Checkout repository
23 uses: actions/checkout@v2
25 # Login against a Docker registry except on PR
26 # https://github.com/docker/login-action
27 - name: Log into registry ${{ env.REGISTRY }}
28 uses: docker/login-action@v1
30 username: ${{ secrets.DOCKERHUB_USERNAME }}
31 password: ${{ secrets.DOCKERHUB_TOKEN }}
37 docker push simgrid/unstable
38 docker push simgrid/tuto-mc
39 - name: Create the failure Message
42 echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker images ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
43 - name: Create the success Message
46 echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker images built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
47 - uses: mattermost/action-mattermost-notify@master
49 MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
50 MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}