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
10 # Rebuild when changing the stable branch
15 # types: [published, created, edited]
20 runs-on: ubuntu-latest
26 - name: Checkout repository
27 uses: actions/checkout@v2
29 # Login against a Docker registry except on PR
30 # https://github.com/docker/login-action
31 - name: Log into registry ${{ env.REGISTRY }}
32 uses: docker/login-action@v1
34 username: ${{ secrets.DOCKERHUB_USERNAME }}
35 password: ${{ secrets.DOCKERHUB_TOKEN }}
39 grep SIMGRID_VERSION_PATCH CMakeLists.txt| grep -q 'SIMGRID_VERSION_PATCH "0"' || (echo "Only run this action on stable source";exit 1)
42 docker push simgrid/stable
43 - name: Create the failure Message
46 echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building STABLE docker image! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
47 - name: Create the success Message
50 echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker STABLE image built and pushed successfully! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
51 - uses: mattermost/action-mattermost-notify@master
53 MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
54 MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
58 # the Dockerfile builds upon the docker-stable image, so add a dependency
61 runs-on: ubuntu-latest
67 - name: Checkout repository
68 uses: actions/checkout@v2
70 # Login against a Docker registry except on PR
71 # https://github.com/docker/login-action
72 - name: Log into registry ${{ env.REGISTRY }}
73 uses: docker/login-action@v1
75 username: ${{ secrets.DOCKERHUB_USERNAME }}
76 password: ${{ secrets.DOCKERHUB_TOKEN }}
80 grep SIMGRID_VERSION_PATCH CMakeLists.txt| grep -q 'SIMGRID_VERSION_PATCH "0"' || (echo "Only run this action on stable source";exit 1)
83 docker push simgrid/tuto-smpi
84 - name: Create the failure Message
87 echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building SMPI docker image on stable docker! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
88 - name: Create the success Message
91 echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker SMPI stable image built and pushed successfully! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
92 - uses: mattermost/action-mattermost-notify@master
94 MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
95 MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}