Skip to content

Commit e3d918b

Browse files
committed
fix last details
1 parent 2593226 commit e3d918b

File tree

1 file changed

+67
-46
lines changed

1 file changed

+67
-46
lines changed

.github/workflows/docker-workflow.yml

Lines changed: 67 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -48,52 +48,52 @@ jobs:
4848
4949
echo "🔍 Final matrix ready."
5050
51-
wheelbuilder:
52-
if: github.event_name == 'push'
53-
runs-on: ubuntu-latest
54-
outputs:
55-
tag: ${{ steps.meta.outputs.tag }}
56-
steps:
57-
- name: 🧾 Checkout
58-
uses: actions/checkout@v3
59-
60-
- name: 🛠 Set up QEMU
61-
uses: docker/setup-qemu-action@v2
62-
63-
- name: 🛠 Set up Docker Buildx
64-
uses: docker/setup-buildx-action@v2
65-
with:
66-
driver-opts: network=host
67-
68-
- name: 🔐 Docker Login
69-
uses: docker/login-action@v2
70-
with:
71-
username: ${{ secrets.DOCKER_USERNAME }}
72-
password: ${{ secrets.DOCKER_PASSWORD }}
73-
74-
- name: 🧠 Generate build tag from hash
75-
id: meta
76-
run: |
77-
HASH=$(sha256sum subvortex/core/Dockerfile.builder | cut -d ' ' -f1)
78-
echo "tag=subvortex/subvortex-wheel-builder:3.11-$HASH" >> $GITHUB_OUTPUT
79-
80-
- name: 🐋 Build & push wheel-builder (only if not exists)
81-
run: |
82-
if docker pull ${{ steps.meta.outputs.tag }} >/dev/null 2>&1; then
83-
echo "✅ Image already exists: ${{ steps.meta.outputs.tag }}"
84-
else
85-
echo "🚀 Building wheel-builder image"
86-
docker buildx build \
87-
--platform linux/amd64,linux/arm64 \
88-
--tag ${{ steps.meta.outputs.tag }} \
89-
--file subvortex/core/Dockerfile.builder \
90-
--push \
91-
.
92-
fi
51+
# wheelbuilder:
52+
# if: github.event_name == 'push'
53+
# runs-on: ubuntu-latest
54+
# outputs:
55+
# tag: ${{ steps.meta.outputs.tag }}
56+
# steps:
57+
# - name: 🧾 Checkout
58+
# uses: actions/checkout@v3
59+
60+
# - name: 🛠 Set up QEMU
61+
# uses: docker/setup-qemu-action@v2
62+
63+
# - name: 🛠 Set up Docker Buildx
64+
# uses: docker/setup-buildx-action@v2
65+
# with:
66+
# driver-opts: network=host
67+
68+
# - name: 🔐 Docker Login
69+
# uses: docker/login-action@v2
70+
# with:
71+
# username: ${{ secrets.DOCKER_USERNAME }}
72+
# password: ${{ secrets.DOCKER_PASSWORD }}
73+
74+
# - name: 🧠 Generate build tag from hash
75+
# id: meta
76+
# run: |
77+
# HASH=$(sha256sum subvortex/core/Dockerfile.builder | cut -d ' ' -f1)
78+
# echo "tag=subvortex/subvortex-wheel-builder:3.11-$HASH" >> $GITHUB_OUTPUT
79+
80+
# - name: 🐋 Build & push wheel-builder (only if not exists)
81+
# run: |
82+
# if docker pull ${{ steps.meta.outputs.tag }} >/dev/null 2>&1; then
83+
# echo "✅ Image already exists: ${{ steps.meta.outputs.tag }}"
84+
# else
85+
# echo "🚀 Building wheel-builder image"
86+
# docker buildx build \
87+
# --platform linux/amd64,linux/arm64 \
88+
# --tag ${{ steps.meta.outputs.tag }} \
89+
# --file subvortex/core/Dockerfile.builder \
90+
# --push \
91+
# .
92+
# fi
9393

9494
build:
9595
if: github.event_name == 'push' || github.event_name == 'delete'
96-
needs: [discover, wheelbuilder]
96+
needs: [discover]
9797
runs-on: ubuntu-latest
9898
permissions:
9999
contents: read
@@ -132,17 +132,38 @@ jobs:
132132
fi
133133
echo "floating_tags=$FLOATING_TAGS" >> $GITHUB_OUTPUT
134134
135+
- name: 🧠 Generate build tag from hash
136+
id: meta
137+
run: |
138+
HASH=$(sha256sum subvortex/core/Dockerfile.builder | cut -d ' ' -f1)
139+
echo "tag=subvortex/subvortex-wheel-builder:3.11-$HASH" >> $GITHUB_OUTPUT
140+
141+
- name: 🐋 Build & push wheel-builder (only if not exists)
142+
id: wheelbuilder
143+
run: |
144+
if docker pull ${{ steps.meta.outputs.tag }} >/dev/null 2>&1; then
145+
echo "✅ Image already exists: ${{ steps.meta.outputs.tag }} "
146+
else
147+
echo "🚀 Building wheel-builder image"
148+
docker buildx build \
149+
--platform linux/amd64,linux/arm64 \
150+
--tag ${{ steps.meta.outputs.tag }} \
151+
--file subvortex/core/Dockerfile.builder \
152+
--push \
153+
.
154+
fi
155+
135156
- name: 🧠 DEBUG!!!!
136157
run: |
137-
echo "${{ needs.wheelbuilder.outputs.tag }}"
158+
echo "${{ steps.meta.outputs.tag }}"
138159
139160
- name: 🚀 Build and push version-tagged image (on tag push only)
140161
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
141162
run: |
142163
COMP="${{ matrix.component }}"
143164
REPO_NAME="subvortex-${COMP//_/-}" && echo "$COMP"
144165
IMAGE="subvortex/$REPO_NAME"
145-
WHEEL_IMAGE="${{ needs.wheelbuilder.outputs.tag }}"
166+
WHEEL_IMAGE="${{ steps.meta.outputs.tag }}"
146167
VERSION_TAG="${{ steps.taginfo.outputs.version_tag }}"
147168
VERSION="${VERSION_TAG#v}"
148169
DOCKERFILE="subvortex/$COMP/Dockerfile"
@@ -166,7 +187,7 @@ jobs:
166187
167188
echo "🚀 Building image $IMAGE:$VERSION"
168189
169-
echo "WHEEL IMAGE: ${{ needs.wheelbuilder.outputs.tag }}"
190+
echo "WHEEL IMAGE: ${{ steps.meta.outputs.tag }}"
170191
echo "WHEEL2 IMAGE: $WHEEL_IMAGE"
171192
172193
docker buildx build \

0 commit comments

Comments
 (0)