File: docker-stable.yml

package info (click to toggle)
simgrid 4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 39,192 kB
  • sloc: cpp: 124,913; ansic: 66,744; python: 8,560; java: 6,773; fortran: 6,079; f90: 5,123; xml: 4,587; sh: 2,194; perl: 1,436; makefile: 111; lisp: 49; javascript: 7; sed: 6
file content (176 lines) | stat: -rw-r--r-- 6,689 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: Docker stable

on:
  workflow_dispatch:
  # Rebuild when changing the stable branch
  push:
      branches:
            - stable
#  release:
#    types: [published, created, edited]

jobs:
  docker-simgrid:

    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      # Login against a Docker registry except on PR
      # https://github.com/docker/login-action
      - name: Log into registry ${{ env.REGISTRY }}
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: build
        run: |
          grep SIMGRID_VERSION_PATCH CMakeLists.txt| grep -q 'SIMGRID_VERSION_PATCH "0"' || (echo "Only run this action on stable source";exit 1)
          sgversion=$(grep set.SIMGRID_VERSION_MINOR CMakeLists.txt|sed 's/[^"]*"//'|sed 's/".*$//')
          echo "sgversion=3.$sgversion" >> $env:GITHUB_ENV
          cd tools/docker
          make stable
          docker push --all-tags simgrid/stable
      - name: Send the failure Message
        if: ${{ failure() }}
        uses: mattermost/action-mattermost-notify@master
        with:
          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
          PAYLOAD: |-
            {
             "channel": "bot-office",
             "attachments": [{
               "color": "#FF0000",
               "text": "Failure when building STABLE docker v${{ env.sgversion }}! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
               "icon": "https://cdn3.iconfinder.com/data/icons/system-basic-vol-4-1/20/icon-note-attention-alt3-512.png"
            }]}
      - name: Send the success Message
        if: ${{ success() }}
        uses: mattermost/action-mattermost-notify@master
        with:
          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
          PAYLOAD: |-
            {
             "channel": "bot-office",
             "attachments": [{
               "color": "#00FF00",
               "text": "Docker STABLE docker v${{ env.sgversion }} built and pushed successfully! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
            }]}

  docker-tuto-s4u:

    # the Dockerfile builds upon the docker-unstable image, so add a dependency
    needs: docker-simgrid
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      # Login against a Docker registry except on PR
      # https://github.com/docker/login-action
      - name: Log into registry ${{ env.REGISTRY }}
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: build docker tuto-s4u
        run: |
          cd tools/docker
          make tuto-s4u
          docker push simgrid/tuto-s4u
      - name: Send the failure Message
        if: ${{ failure() }}
        uses: mattermost/action-mattermost-notify@master
        with:
          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
          PAYLOAD: |-
            {
             "channel": "bot-office",
             "attachments": [{
               "color": "#FF0000",
               "text": "Failure when building docker tuto-s4u! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
               "icon": "https://cdn3.iconfinder.com/data/icons/system-basic-vol-4-1/20/icon-note-attention-alt3-512.png"
            }]}
      - name: Send the success Message
        if: ${{ success() }}
        uses: mattermost/action-mattermost-notify@master
        with:
          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
          PAYLOAD: |-
            {
             "channel": "bot-office",
             "attachments": [{
               "color": "#00FF00",
               "text": "Docker tuto-s4u built and pushed successfully! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
            }]}

  docker-tuto-smpi:
    # the Dockerfile builds upon the docker-stable image, so add a dependency
    needs: docker-simgrid

    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      # Login against a Docker registry except on PR
      # https://github.com/docker/login-action
      - name: Log into registry ${{ env.REGISTRY }}
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: build tuto SMPI
        run: |
          grep SIMGRID_VERSION_PATCH CMakeLists.txt| grep -q 'SIMGRID_VERSION_PATCH "0"' || (echo "Only run this action on stable source";exit 1)
          cd tools/docker
          make tuto-smpi
          docker push simgrid/tuto-smpi
      - name: Send the failure Message
        if: ${{ failure() }}
        uses: mattermost/action-mattermost-notify@master
        with:
          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
          PAYLOAD: |-
            {
             "channel": "bot-office",
             "attachments": [{
               "color": "#FF0000",
               "text": "Failure when building docker tuto SMPI! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
               "icon": "https://cdn3.iconfinder.com/data/icons/system-basic-vol-4-1/20/icon-note-attention-alt3-512.png"
            }]}
      - name: Send the success Message
        if: ${{ success() }}
        uses: mattermost/action-mattermost-notify@master
        with:
          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
          PAYLOAD: |-
            {
             "channel": "bot-office",
             "attachments": [{
               "color": "#00FF00",
               "text": "Docker tuto SMPI built and pushed successfully! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
            }]}