55 # Allow to run manually
66 branches :
77 - ' develop'
8- - ' docker_hub_gha'
98 push :
109 tags :
1110 # Just create image on pushing a tag
1413jobs :
1514 sagemath-dev :
1615 name : Build Docker image on target make-build and push to DockerHub sagemath-dev
16+ # target make-build replaces former sagemath-dev, see https://github.com/sagemath/sage/pull/36047
1717 runs-on : ubuntu-latest
1818 steps :
1919 - name : Checkout
2525 id : set_tag
2626 run : |
2727 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
28- TAG_NAME=$(git tag --sort=v:refname | tail -1)
28+ TAG_NAME=$(git tag --sort=creatordate | tail -1)
2929 TAG="sagemath/sagemath-dev:$TAG_NAME"
3030 TAG_LIST="$TAG, sagemath/sagemath-dev:develop"
31- TAG_LIST="$TAG" # don't tag develop until meaning of sagemath-dev is clear
3231 echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
3332 echo "TAG=$TAG" >> $GITHUB_ENV
3433 echo "TAG_LIST=$TAG_LIST" >> $GITHUB_ENV
@@ -37,30 +36,20 @@ jobs:
3736 id : upd_tag_list
3837 run : |
3938 TAG_LIST="${{ env.TAG_LIST }}, sagemath/sagemath-dev:latest"
40- TAG_LIST="${{ env.TAG_LIST }}" # don't tag latest until meaning of sagemath-dev is clear
4139 echo "TAG_LIST=$TAG_LIST" >> $GITHUB_ENV
4240 if : " !contains(env.TAG_NAME, 'beta') && !contains(env.TAG_NAME, 'rc')"
4341
44- - name : Check env
45- run : |
46- echo ${{ env.TAG_NAME }}
47- echo ${{ env.TAG }}
48- echo ${{ env.TAG_LIST }}
49-
50- - name : Set up QEMU
51- uses : docker/setup-qemu-action@v2
52-
5342 - name : Set up Docker Buildx
54- uses : docker/setup-buildx-action@v2
43+ uses : docker/setup-buildx-action@v3
5544
5645 - name : Login to Docker Hub
57- uses : docker/login-action@v2
46+ uses : docker/login-action@v3
5847 with :
5948 username : ${{ secrets.DOCKERHUB_USERNAME }}
6049 password : ${{ secrets.DOCKERHUB_TOKEN }}
6150
6251 - name : Build and push make-build
63- uses : docker/build-push-action@v4
52+ uses : docker/build-push-action@v5
6453 with :
6554 context : .
6655 file : docker/Dockerfile
8473 id : set_tag
8574 run : |
8675 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
87- TAG_NAME=$(git tag --sort=v:refname | tail -1)
76+ TAG_NAME=$(git tag --sort=creatordate | tail -1)
8877 TAG="sagemath/sagemath:$TAG_NAME"
8978 TAG_LIST="$TAG, sagemath/sagemath:develop"
9079 BASE="sagemath/sagemath-dev:$TAG_NAME"
@@ -100,20 +89,17 @@ jobs:
10089 echo "TAG_LIST=$TAG_LIST" >> $GITHUB_ENV
10190 if : " !contains(env.TAG_NAME, 'beta') && !contains(env.TAG_NAME, 'rc')"
10291
103- - name : Set up QEMU
104- uses : docker/setup-qemu-action@v2
105-
10692 - name : Set up Docker Buildx
107- uses : docker/setup-buildx-action@v2
93+ uses : docker/setup-buildx-action@v3
10894
10995 - name : Login to Docker Hub
110- uses : docker/login-action@v2
96+ uses : docker/login-action@v3
11197 with :
11298 username : ${{ secrets.DOCKERHUB_USERNAME }}
11399 password : ${{ secrets.DOCKERHUB_TOKEN }}
114100
115101 - name : Build and push sagemath
116- uses : docker/build-push-action@v4
102+ uses : docker/build-push-action@v5
117103 with :
118104 context : .
119105 file : docker/Dockerfile
0 commit comments