Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
bummer
[simgrid.git] / .github / workflows / docker.yml
1 name: Docker unstable
2
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
6 # documentation.
7
8 on:
9   workflow_dispatch:
10   schedule:
11     - cron: '42 18 * * 0'
12
13 jobs:
14   docker-unstable:
15
16     runs-on: ubuntu-latest
17     permissions:
18       contents: read
19       packages: write
20
21     steps:
22       - name: Checkout repository
23         uses: actions/checkout@v2
24
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
29         with:
30           username: ${{ secrets.DOCKERHUB_USERNAME }}
31           password: ${{ secrets.DOCKERHUB_TOKEN }}
32
33       - name: build docker unstable
34         run: |
35           cd tools/docker
36           make unstable
37           docker push simgrid/unstable
38       - name: Create the failure Message
39         if: ${{ failure() }}
40         run: |
41           echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker unstable ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
42       - name: Create the success Message
43         if: ${{ success() }}
44         run: |
45           echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker unstable built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
46       - uses: mattermost/action-mattermost-notify@master
47         env:
48           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
49           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
50
51   docker-tuto-s4u:
52
53     needs: docker-unstable
54     runs-on: ubuntu-latest
55     permissions:
56       contents: read
57       packages: write
58
59     steps:
60       - name: Checkout repository
61         uses: actions/checkout@v2
62
63       # Login against a Docker registry except on PR
64       # https://github.com/docker/login-action
65       - name: Log into registry ${{ env.REGISTRY }}
66         uses: docker/login-action@v1
67         with:
68           username: ${{ secrets.DOCKERHUB_USERNAME }}
69           password: ${{ secrets.DOCKERHUB_TOKEN }}
70
71       - name: build docker tuto-s4u
72         run: |
73           cd tools/docker
74           make tuto-s4u
75           docker push simgrid/tuto-s4u
76       - name: Create the failure Message
77         if: ${{ failure() }}
78         run: |
79           echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker tuto-s4u image ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
80       - name: Create the success Message
81         if: ${{ success() }}
82         run: |
83           echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker tuto-s4u image built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
84       - uses: mattermost/action-mattermost-notify@master
85         env:
86           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
87           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
88
89   docker-tuto-mc:
90
91     needs: docker-unstable
92     runs-on: ubuntu-latest
93     permissions:
94       contents: read
95       packages: write
96
97     steps:
98       - name: Checkout repository
99         uses: actions/checkout@v2
100
101       # Login against a Docker registry except on PR
102       # https://github.com/docker/login-action
103       - name: Log into registry ${{ env.REGISTRY }}
104         uses: docker/login-action@v1
105         with:
106           username: ${{ secrets.DOCKERHUB_USERNAME }}
107           password: ${{ secrets.DOCKERHUB_TOKEN }}
108
109       - name: build docker tuto-mc
110         run: |
111           cd tools/docker
112           make tuto-mc
113           docker push simgrid/tuto-mc
114
115       - name: Create the failure Message
116         if: ${{ failure() }}
117         run: |
118           echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker tuto-mc image ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
119       - name: Create the success Message
120         if: ${{ success() }}
121         run: |
122           echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker tuto-mc image built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
123       - uses: mattermost/action-mattermost-notify@master
124         env:
125           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
126           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
127