Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
830b366996c5d89db0715bb5fdafb84005902367
[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
52   docker-tuto-mc:
53
54     # the Dockerfile builds upon debian:testing
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-mc
73         run: |
74           cd tools/docker
75           make tuto-mc
76           docker push simgrid/tuto-mc
77
78       - name: Create the failure Message
79         if: ${{ failure() }}
80         run: |
81           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
82       - name: Create the success Message
83         if: ${{ success() }}
84         run: |
85           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
86       - uses: mattermost/action-mattermost-notify@master
87         env:
88           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
89           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
90