diff --git a/.github/workflows/push_to_docker_hub.yml b/.github/workflows/push_to_docker_hub.yml index eb36f3c979a..77a9f819d70 100644 --- a/.github/workflows/push_to_docker_hub.yml +++ b/.github/workflows/push_to_docker_hub.yml @@ -5,7 +5,6 @@ on: # Allow to run manually branches: - 'develop' - - 'docker_hub_gha' push: tags: # Just create image on pushing a tag @@ -14,6 +13,7 @@ on: jobs: sagemath-dev: name: Build Docker image on target make-build and push to DockerHub sagemath-dev + # target make-build replaces former sagemath-dev, see https://github.com/sagemath/sage/pull/36047 runs-on: ubuntu-latest steps: - name: Checkout @@ -25,10 +25,9 @@ jobs: id: set_tag run: | git fetch --depth=1 origin +refs/tags/*:refs/tags/* - TAG_NAME=$(git tag --sort=v:refname | tail -1) + TAG_NAME=$(git tag --sort=creatordate | tail -1) TAG="sagemath/sagemath-dev:$TAG_NAME" TAG_LIST="$TAG, sagemath/sagemath-dev:develop" - TAG_LIST="$TAG" # don't tag develop until meaning of sagemath-dev is clear echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV echo "TAG=$TAG" >> $GITHUB_ENV echo "TAG_LIST=$TAG_LIST" >> $GITHUB_ENV @@ -37,30 +36,20 @@ jobs: id: upd_tag_list run: | TAG_LIST="${{ env.TAG_LIST }}, sagemath/sagemath-dev:latest" - TAG_LIST="${{ env.TAG_LIST }}" # don't tag latest until meaning of sagemath-dev is clear echo "TAG_LIST=$TAG_LIST" >> $GITHUB_ENV if: "!contains(env.TAG_NAME, 'beta') && !contains(env.TAG_NAME, 'rc')" - - name: Check env - run: | - echo ${{ env.TAG_NAME }} - echo ${{ env.TAG }} - echo ${{ env.TAG_LIST }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push make-build - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: docker/Dockerfile @@ -84,7 +73,7 @@ jobs: id: set_tag run: | git fetch --depth=1 origin +refs/tags/*:refs/tags/* - TAG_NAME=$(git tag --sort=v:refname | tail -1) + TAG_NAME=$(git tag --sort=creatordate | tail -1) TAG="sagemath/sagemath:$TAG_NAME" TAG_LIST="$TAG, sagemath/sagemath:develop" BASE="sagemath/sagemath-dev:$TAG_NAME" @@ -100,20 +89,17 @@ jobs: echo "TAG_LIST=$TAG_LIST" >> $GITHUB_ENV if: "!contains(env.TAG_NAME, 'beta') && !contains(env.TAG_NAME, 'rc')" - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push sagemath - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile index 6b0ecab4795..cc0701d8d81 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -75,8 +75,8 @@ ARG MAKE_BUILD=make-build ################################################################################ # Image containing the run-time dependencies for Sage # ################################################################################ -FROM ubuntu:latest as run-time-dependencies -LABEL maintainer="Erik M. Bray , Julian Rüth " +FROM ubuntu:jammy as run-time-dependencies +LABEL maintainer="Erik M. Bray , Julian Rüth , Sebastian Oehms " # Set sane defaults for common environment variables. ENV LC_ALL C.UTF-8 ENV LANG C.UTF-8