99 build-and-push :
1010 runs-on : ubuntu-latest
1111 strategy :
12- # If any matrix job fails, cancel all others immediately.
1312 fail-fast : true
1413 matrix :
15- # Defines the different configurations to build.
16- # This will generate 16 parallel jobs (2 * 2 * 2 * 2).
1714 dockerfile : ["Dockerfile.cuda", "Dockerfile.common"]
1815 install_llvm : [true, false]
19- install_rust : [true, false]
2016 install_torch : [true, false]
2117
2218 steps :
@@ -32,27 +28,24 @@ jobs:
3228 swap-storage : true
3329
3430 - name : Checkout repository
35- uses : actions/checkout@v4 # Using the latest version
31+ uses : actions/checkout@v4
3632
3733 - name : Set up Docker Buildx
38- uses : docker/setup-buildx-action@v3 # Using the latest version
34+ uses : docker/setup-buildx-action@v3
3935
4036 - name : Login to Docker Hub
41- uses : docker/login-action@v3 # Using the latest version
37+ uses : docker/login-action@v3
4238 with :
4339 username : ${{ secrets.DOCKERHUB_USERNAME }}
4440 password : ${{ secrets.DOCKERHUB_TOKEN }}
4541
4642 - name : Build Docker image
4743 env :
48- # Set environment variables for the build script from the matrix
4944 INSTALL_LLVM : ${{ matrix.install_llvm }}
50- INSTALL_RUST : ${{ matrix.install_rust }}
5145 INSTALL_TORCH : ${{ matrix.install_torch }}
52- # Pass the correct Dockerfile name from the matrix to the build script
53- run : bash ./scripts/build.sh "${{ matrix.dockerfile }}"
46+ run : |
47+ bash ./scripts/build.sh "${{ matrix.dockerfile }}"
48+ echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
5449
55- - name : Push Docker image(s)
56- # This assumes push.sh can discover and push the image(s) created
57- # in the previous step without explicit arguments.
58- run : bash ./scripts/push.sh
50+ - name : Push Docker image
51+ run : bash ./scripts/push.sh "${{ env.IMAGE_NAME }}"
0 commit comments