@@ -20,12 +20,13 @@ jobs:
2020 registry : ghcr.io
2121 username : ${{ github.actor }} # Uses the GitHub user/org name that triggered the workflow
2222 password : ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub
23+ - run : echo "VERSION=$(cat ./src/xcp_ng_dev/files/protocol-version.txt | tr -d '\n')" >> $GITHUB_ENV
2324 - uses : docker/build-push-action@v5 # Using v5 for latest features
2425 with :
2526 context : ./container
2627 file : ./container/Dockerfile-8.x
2728 push : ${{ github.ref == 'refs/heads/master' }}
28- tags : ghcr.io/${{ github.repository }}:8.2
29+ tags : ghcr.io/${{ github.repository }}:8.2-${{ env.VERSION }}
2930 cache-from : type=gha,scope=${{ github.ref_name }}-82 # Cache layers to speed up builds
3031 cache-to : type=gha,mode=max,scope=${{ github.ref_name }}-82 # Store layers in cache for future builds
3132 build-args : |
@@ -46,12 +47,13 @@ jobs:
4647 registry : ghcr.io
4748 username : ${{ github.actor }} # Uses the GitHub user/org name that triggered the workflow
4849 password : ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub
50+ - run : echo "VERSION=$(cat ./src/xcp_ng_dev/files/protocol-version.txt | tr -d '\n')" >> $GITHUB_ENV
4951 - uses : docker/build-push-action@v5 # Using v5 for latest features
5052 with :
5153 context : ./container
5254 file : ./container/Dockerfile-8.x
5355 push : ${{ github.ref == 'refs/heads/master' }}
54- tags : ghcr.io/${{ github.repository }}:8.3
56+ tags : ghcr.io/${{ github.repository }}:8.3-${{ env.VERSION }}
5557 cache-from : type=gha,scope=${{ github.ref_name }}-83 # Cache layers to speed up builds
5658 cache-to : type=gha,mode=max,scope=${{ github.ref_name }}-83 # Store layers in cache for future builds
5759 platforms : |
@@ -71,13 +73,14 @@ jobs:
7173 # registry: ghcr.io
7274 # username: ${{ github.actor }} # Uses the GitHub user/org name that triggered the workflow
7375 # password: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub
76+ # - run: echo "VERSION=$(cat ./src/xcp_ng_dev/files/protocol-version.txt | tr -d '\n')" >> $GITHUB_ENV
7477 # - uses: docker/build-push-action@v5 # Using v5 for latest features
7578 # with:
7679 # context: ./container
7780 # file: ./container/Dockerfile-9.x
7881 # platforms: |
7982 # linux/amd64/v2
8083 # push: ${{ github.ref == 'refs/heads/master' }}
81- # tags: ghcr.io/${{ github.repository }}:9.0
84+ # tags: ghcr.io/${{ github.repository }}:9.0-${{ env.VERSION }}
8285 # cache-from: type=gha,scope=${{ github.ref_name }}-90 # Cache layers to speed up builds
8386 # cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-90 # Store layers in cache for future builds
0 commit comments