@@ -35,11 +35,11 @@ jobs:
3535 - name : Set up Docker Buildx
3636 uses : docker/setup-buildx-action@v3
3737
38- - name : Get latest pretext version from PyPI
38+ - name : Read version from verstion.txt
3939 run : |
40- PTX_VERSION =$(curl -s https://pypi.org/pypi/pretext/json | grep -oP '"version":\s*"\K[^"]+ ')
41- echo "Latest pretext version: $PTX_VERSION "
42- echo "PTX_VERSION=$PTX_VERSION " >> $GITHUB_ENV
40+ VERSION =$(cat version.txt | tr -d '\n ')
41+ echo "Container version to deploy : $VERSION "
42+ echo "VERSION=$VERSION " >> $GITHUB_ENV
4343
4444 - name : Build and push base
4545 if : ${{ github.event.inputs.container == 'all' || github.event.inputs.container == 'base' || github.event.inputs.container == '' }}
@@ -49,15 +49,15 @@ jobs:
4949 context : .
5050 file : ./base/Dockerfile
5151 push : true
52- tags : ${{ secrets.DOCKERHUB_USERNAME }}/pretext:${{ env.PTX_VERSION }},${{ secrets.DOCKERHUB_USERNAME }}/pretext:latest
52+ tags : ${{ secrets.DOCKERHUB_USERNAME }}/pretext:${{ env.VERSION }},${{ secrets.DOCKERHUB_USERNAME }}/pretext:latest
5353
5454 - name : Build and push full
5555 if : ${{ github.event.inputs.container == 'all' || github.event.inputs.container == 'full' || github.event.inputs.container == '' }}
5656 uses : docker/build-push-action@v6
5757 with :
5858 platforms : linux/amd64,linux/arm64
5959 context : .
60- build-args : BASE_IMAGE_TAG=${{ env.PTX_VERSION }}
60+ build-args : BASE_IMAGE_TAG=${{ env.VERSION }}
6161 file : ./full/Dockerfile
6262 push : true
63- tags : ${{ secrets.DOCKERHUB_USERNAME }}/pretext-full:${{ env.PTX_VERSION }},${{ secrets.DOCKERHUB_USERNAME }}/pretext-full:latest
63+ tags : ${{ secrets.DOCKERHUB_USERNAME }}/pretext-full:${{ env.VERSION }},${{ secrets.DOCKERHUB_USERNAME }}/pretext-full:latest
0 commit comments