1111env :
1212 REGISTRY : ghcr.io
1313 IMAGE_NAME : xs-mlvp/envbase
14- IMAGE_TAG : ${{ github.sha.substring(0, 7) }}
14+ FULL_IMAGE_NAME : xs-mlvp/envfull
15+ IMAGE_TAG : ${{ github.sha }}
1516
1617jobs :
17- build-and-push :
18+ build-and-push-base :
1819 runs-on : ubuntu-latest
1920 permissions :
2021 contents : read
4647 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
4748 cache-from : type=local,src=/tmp/.buildx-cache
4849 cache-to : type=local,dest=/tmp/.buildx-cache
50+
51+ build-and-push-full :
52+ runs-on : ubuntu-latest
53+ needs : build-and-push-base
54+ permissions :
55+ contents : read
56+ packages : write
57+
58+ steps :
59+ - name : Checkout repository
60+ uses : actions/checkout@v4
61+
62+ - name : Set up Docker Buildx
63+ uses : docker/setup-buildx-action@v2
64+
65+ - name : Log in to GitHub Container Registry
66+ uses : docker/login-action@v2
67+ with :
68+ registry : ${{ env.REGISTRY }}
69+ username : ${{ github.actor }}
70+ password : ${{ secrets.GITHUB_TOKEN }}
71+
72+ - name : Build and push Docker image
73+ uses : docker/build-push-action@v4
74+ with :
75+ context : .
76+ file : ./docker/Dockerfile.full
77+ platforms : linux/amd64,linux/arm64
78+ push : true
79+ tags : |
80+ ${{ env.REGISTRY }}/${{ env.FULL_IMAGE_NAME }}:${{ env.IMAGE_TAG }}
81+ ${{ env.REGISTRY }}/${{ env.FULL_IMAGE_NAME }}:latest
82+ cache-from : type=local,src=/tmp/.buildx-cache
83+ cache-to : type=local,dest=/tmp/.buildx-cache
0 commit comments