From: Martin Quinson Date: Fri, 21 Jan 2022 13:54:16 +0000 (+0100) Subject: split the action to build the s4u tuto docker image X-Git-Tag: v3.30~67 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/413aa1ed102ae355c40c61248e2fbe749ed1b9cf?hp=d8577269e6d290370ff3420732585e667aa62357 split the action to build the s4u tuto docker image --- diff --git a/.github/workflows/docker-stable.yml b/.github/workflows/docker-stable.yml index 2008a3f697..bf95828a74 100644 --- a/.github/workflows/docker-stable.yml +++ b/.github/workflows/docker-stable.yml @@ -38,9 +38,8 @@ jobs: 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 stable tuto-s4u tuto-smpi + make stable tuto-smpi docker push simgrid/stable - docker push simgrid/tuto-s4u docker push simgrid/tuto-smpi - name: Create the failure Message if: ${{ failure() }} diff --git a/.github/workflows/docker-tuto-s4u.yml b/.github/workflows/docker-tuto-s4u.yml new file mode 100644 index 0000000000..11cb1849f7 --- /dev/null +++ b/.github/workflows/docker-tuto-s4u.yml @@ -0,0 +1,55 @@ +name: Docker stable + +# 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: + # Rebuild when changing the stable branch + push: + 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}} +