Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge the docker-tuto-s4u action into docker, to ease synchronization issues
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 24 Jan 2022 14:27:26 +0000 (15:27 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 24 Jan 2022 14:34:41 +0000 (15:34 +0100)
Introduce 3 jobs, one per docker target

.github/workflows/docker-tuto-s4u.yml [deleted file]
.github/workflows/docker.yml

diff --git a/.github/workflows/docker-tuto-s4u.yml b/.github/workflows/docker-tuto-s4u.yml
deleted file mode 100644 (file)
index 6f78b07..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-name: Docker tutorial S4U
-
-# This workflow uses actions that are not certified by GitHub.
-# They are provided by a third-party and are governed by
-# separate terms of service, privacy policy, and support
-# documentation.
-
-on:
-  workflow_dispatch:
-  schedule: # each week-end, since it's using the unstable docker image
-      - cron: '0 20 * * 0'
-  push: # when pushing on the stable branche, as this is intended to use the stable docker image when not needing the bleeding edge
-      branches:
-            - stable
-#  release:
-#    types: [published, created, edited]
-
-jobs:
-  build:
-
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read
-      packages: write
-
-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@v2
-
-      # Login against a Docker registry except on PR
-      # https://github.com/docker/login-action
-      - name: Log into registry ${{ env.REGISTRY }}
-        uses: docker/login-action@v1
-        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)
-          cd tools/docker
-          make tuto-s4u
-          docker push simgrid/tuto-s4u
-      - name: Create the failure Message
-        if: ${{ failure() }}
-        run: |
-          echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building tuto-s4u docker images ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
-      - name: Create the success Message
-        if: ${{ success() }}
-        run: |
-          echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker tuto-s4u images built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
-      - uses: mattermost/action-mattermost-notify@master
-        env:
-          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
-          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
-
index 13dd5ed..4070995 100644 (file)
@@ -11,7 +11,7 @@ on:
     - cron: '42 18 * * 0'
 
 jobs:
-  build:
+  docker-unstable:
 
     runs-on: ubuntu-latest
     permissions:
@@ -30,20 +30,94 @@ jobs:
           username: ${{ secrets.DOCKERHUB_USERNAME }}
           password: ${{ secrets.DOCKERHUB_TOKEN }}
 
-      - name: build
+      - name: build docker unstable
         run: |
           cd tools/docker
-          make unstable tuto-mc
+          make unstable
           docker push simgrid/unstable
+      - name: Create the failure Message
+        if: ${{ failure() }}
+        run: |
+          echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker unstable ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
+      - name: Create the success Message
+        if: ${{ success() }}
+        run: |
+          echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker unstable built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
+      - uses: mattermost/action-mattermost-notify@master
+        env:
+          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
+          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
+
+  docker-tuto-s4u:
+
+    needs: docker-unstable
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      packages: write
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v2
+
+      # Login against a Docker registry except on PR
+      # https://github.com/docker/login-action
+      - name: Log into registry ${{ env.REGISTRY }}
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+      - name: build docker tuto-s4u
+        run: |
+          make tuto-s4u
+          docker push simgrid/tuto-s4u
+      - name: Create the failure Message
+        if: ${{ failure() }}
+        run: |
+          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
+      - name: Create the success Message
+        if: ${{ success() }}
+        run: |
+          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
+      - uses: mattermost/action-mattermost-notify@master
+        env:
+          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
+          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
+
+  docker-tuto-mc:
+
+    needs: docker-unstable
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      packages: write
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v2
+
+      # Login against a Docker registry except on PR
+      # https://github.com/docker/login-action
+      - name: Log into registry ${{ env.REGISTRY }}
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+      - name: build docker tuto-mc
+        run: |
+          make tuto-mc
           docker push simgrid/tuto-mc
+
       - name: Create the failure Message
         if: ${{ failure() }}
         run: |
-          echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker images ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
+          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
       - name: Create the success Message
         if: ${{ success() }}
         run: |
-          echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker images built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
+          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
       - uses: mattermost/action-mattermost-notify@master
         env:
           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}