@@ -38,15 +38,12 @@ jobs:
3838 - name : Upload wheels
3939 uses : actions/upload-artifact@v4
4040 with :
41- name : triton-wheels
41+ name : triton-wheels-${{ matrix.config.arch }}
4242 path : ./wheelhouse/*.whl
4343
44- docker-hub-release-amd64 :
44+ docker-hub-release :
4545 runs-on : ubuntu-latest
46- concurrency : amd64
47- outputs :
48- image-digest : ${{ steps.build.outputs.digest }}
49- image-tags : ${{ steps.metadata.outputs.tags }}
46+ needs : build-triton-wheel
5047 steps :
5148 - name : Free additional disk space
5249 run : |
@@ -63,68 +60,21 @@ jobs:
6360 df -h
6461 - name : Checkout
6562 uses : actions/checkout@v5
66- - name : Prepare image metadata
67- id : metadata
68- uses : docker/metadata-action@v5
69- with :
70- images : ${{ env.IMAGE }}
71- tags : |
72- type=ref,event=tag,suffix=-amd64
73- - name : Set up QEMU
74- uses : docker/setup-qemu-action@v3
75- - name : Set up Docker Buildx
76- uses : docker/setup-buildx-action@v3
77- - name : Login to Docker Hub
78- uses : docker/login-action@v3
79- with :
80- username : ${{ secrets.DOCKER_HUB_USERNAME }}
81- password : ${{ secrets.DOCKER_HUB_TOKEN }}
82- - name : Build, tag, and push image
83- id : build
84- uses : docker/build-push-action@v6
63+ - name : Download amd64 wheels
64+ uses : actions/download-artifact@v5
8565 with :
86- context : .
87- file : Dockerfile.amd64
88- labels : ${{ steps.metadata.outputs.labels }}
89- platforms : linux/amd64
90- push : true
91- tags : ${{ steps.metadata.outputs.tags }}
92-
93- docker-hub-release-arm64 :
94- runs-on : ubuntu-latest
95- needs : build-triton-wheel-arm64
96- concurrency : arm64
97- outputs :
98- image-digest : ${{ steps.build.outputs.digest }}
99- image-tags : ${{ steps.metadata.outputs.tags }}
100- steps :
101- - name : Free additional disk space
102- run : |
103- df -h
104- echo "Removing android..."
105- sudo rm -rf /usr/local/lib/android
106- echo "Removing dotnet..."
107- sudo rm -rf /usr/share/dotnet
108- echo "Removing haskell"
109- sudo rm -rf /opt/ghc
110- sudo rm -rf /usr/local/.ghcup
111- echo "Removing tool cache..."
112- sudo rm -rf /opt/hostedtoolcache
113- df -h
114- - name : Checkout
115- uses : actions/checkout@v5
116- - name : Download a single artifact
66+ name : triton-wheels-x86_64
67+ path : ./wheelhouse/
68+ - name : Download arm64 wheels
11769 uses : actions/download-artifact@v5
11870 with :
119- name : triton-wheels-linux-arm64
71+ name : triton-wheels-aarch64
12072 path : ./wheelhouse/
12173 - name : Prepare image metadata
12274 id : metadata
12375 uses : docker/metadata-action@v5
12476 with :
12577 images : ${{ env.IMAGE }}
126- tags : |
127- type=ref,event=tag,suffix=-arm64
12878 - name : Set up QEMU
12979 uses : docker/setup-qemu-action@v3
13080 - name : Set up Docker Buildx
@@ -134,72 +84,19 @@ jobs:
13484 with :
13585 username : ${{ secrets.DOCKER_HUB_USERNAME }}
13686 password : ${{ secrets.DOCKER_HUB_TOKEN }}
137- - name : Build, tag, and push image
138- id : build
87+ - name : Build, tag, and push image to Docker Hub
13988 uses : docker/build-push-action@v6
14089 with :
14190 context : .
142- file : Dockerfile.arm64
91+ file : Dockerfile
14392 labels : ${{ steps.metadata.outputs.labels }}
144- platforms : linux/arm64
93+ platforms : linux/amd64,linux/ arm64
14594 push : true
14695 tags : ${{ steps.metadata.outputs.tags }}
14796
148- docker-hub-release-manifest :
149- runs-on : ubuntu-latest
150- needs :
151- - docker-hub-release-amd64
152- - docker-hub-release-arm64
153- steps :
154- - name : Checkout
155- uses : actions/checkout@v5
156- - name : Prepare image metadata
157- id : metadata
158- uses : docker/metadata-action@v5
159- with :
160- images : ${{ env.IMAGE }}
161- tags : |
162- type=ref,event=pr
163- type=raw,value=latest
164- - name : Set up QEMU
165- uses : docker/setup-qemu-action@v3
166- - name : Set up Docker Buildx
167- uses : docker/setup-buildx-action@v3
168- - name : Login to Docker Hub
169- uses : docker/login-action@v3
170- with :
171- username : ${{ secrets.DOCKER_HUB_USERNAME }}
172- password : ${{ secrets.DOCKER_HUB_TOKEN }}
173- - name : Create and push multi-arch manifest
174- run : |
175- # Extract the main tag (without architecture suffix)
176- MAIN_TAGS="${{ steps.metadata.outputs.tags }}"
177-
178- # Get architecture-specific tags from previous jobs
179- AMD64_TAGS="${{ needs.docker-hub-release-amd64.outputs.image-tags }}"
180- ARM64_TAGS="${{ needs.docker-hub-release-arm64.outputs.image-tags }}"
181-
182- # Extract the first tag from each architecture
183- AMD64_TAG=$(echo "$AMD64_TAGS" | head -n1)
184- ARM64_TAG=$(echo "$ARM64_TAGS" | head -n1)
185-
186- # Create and push manifest for each main tag
187- echo "$MAIN_TAGS" | while read -r TAG; do
188- if [ -n "$TAG" ]; then
189- echo "Creating manifest for $TAG"
190- docker buildx imagetools create -t "$TAG" "$AMD64_TAG" "$ARM64_TAG"
191- fi
192- done
193- - name : Update description on Docker Hub
194- uses : peter-evans/dockerhub-description@v5
195- with :
196- username : ${{ secrets.DOCKER_HUB_USERNAME }}
197- password : ${{ secrets.DOCKER_HUB_TOKEN }}
198- repository : ${{ env.IMAGE }}
199-
20097 github-release :
20198 runs-on : ubuntu-latest
202- needs : docker-hub-release-manifest
99+ needs : docker-hub-release
203100 steps :
204101 - name : Checkout
205102 uses : actions/checkout@v5
0 commit comments