Skip to content

Commit 1e3edb0

Browse files
maxholmanclaude
andcommitted
fix(ci): add cross Docker image build step to build-and-publish workflow
The musl and aarch64 cross builds were failing with "Unable to find image 'wallhack-cross:...' locally" because the custom Docker image was never built before running cross. Add setup-buildx + build-push steps (gated on matrix.custom_image) matching what pr.yml does. Shares the GHA Docker layer cache via scope=cross-musl. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 44c5f4b commit 1e3edb0

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/build-and-publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
os: ubuntu-latest
3636
artifact: wallhack-linux-x64-musl
3737
cross: true
38+
custom_image: true
3839
- target: aarch64-unknown-linux-gnu
3940
os: ubuntu-latest
4041
artifact: wallhack-linux-arm64
@@ -91,6 +92,20 @@ jobs:
9192
gh release download "$CROSS_VERSION" --repo cross-rs/cross --pattern 'cross-x86_64-unknown-linux-musl.tar.gz' -D /tmp
9293
tar xz -C ~/.cargo/bin cross < /tmp/cross-x86_64-unknown-linux-musl.tar.gz
9394
95+
- uses: docker/setup-buildx-action@v4
96+
if: matrix.custom_image
97+
98+
- name: Build and cache cross Docker image
99+
if: matrix.custom_image
100+
uses: docker/build-push-action@v7
101+
with:
102+
context: .
103+
file: Dockerfile.cross-musl
104+
tags: wallhack-cross:${{ matrix.target }}
105+
load: true
106+
cache-from: type=gha,scope=cross-musl
107+
cache-to: type=gha,mode=max,scope=cross-musl
108+
94109
- name: Build (native)
95110
if: ${{ !matrix.cross }}
96111
run: cargo build --release --target ${{ matrix.target }} -p wallhack-cli ${{ matrix.features }}

0 commit comments

Comments
 (0)