Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
adjust the dependencies between the docker images [no-ci]
[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     # the Dockerfile builds upon the docker-unstable image, so add a dependency
54     needs: docker-unstable
55     runs-on: ubuntu-latest
56     permissions:
57       contents: read
58       packages: write
59
60     steps:
61       - name: Checkout repository
62         uses: actions/checkout@v2
63
64       # Login against a Docker registry except on PR
65       # https://github.com/docker/login-action
66       - name: Log into registry ${{ env.REGISTRY }}
67         uses: docker/login-action@v1
68         with:
69           username: ${{ secrets.DOCKERHUB_USERNAME }}
70           password: ${{ secrets.DOCKERHUB_TOKEN }}
71
72       - name: build docker tuto-s4u
73         run: |
74           cd tools/docker
75           make tuto-s4u
76           docker push simgrid/tuto-s4u
77       - name: Create the failure Message
78         if: ${{ failure() }}
79         run: |
80           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
81       - name: Create the success Message
82         if: ${{ success() }}
83         run: |
84           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
85       - uses: mattermost/action-mattermost-notify@master
86         env:
87           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
88           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
89
90   docker-tuto-mc:
91
92     # the Dockerfile builds upon debian:testing
93     runs-on: ubuntu-latest
94     permissions:
95       contents: read
96       packages: write
97
98     steps:
99       - name: Checkout repository
100         uses: actions/checkout@v2
101
102       # Login against a Docker registry except on PR
103       # https://github.com/docker/login-action
104       - name: Log into registry ${{ env.REGISTRY }}
105         uses: docker/login-action@v1
106         with:
107           username: ${{ secrets.DOCKERHUB_USERNAME }}
108           password: ${{ secrets.DOCKERHUB_TOKEN }}
109
110       - name: build docker tuto-mc
111         run: |
112           cd tools/docker
113           make tuto-mc
114           docker push simgrid/tuto-mc
115
116       - name: Create the failure Message
117         if: ${{ failure() }}
118         run: |
119           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
120       - name: Create the success Message
121         if: ${{ success() }}
122         run: |
123           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
124       - uses: mattermost/action-mattermost-notify@master
125         env:
126           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
127           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
128