Skip to content

Commit d6dfd25

Browse files
authored
Merge pull request #72 from block65/fix/build-publish-cross-image
fix(ci): add cross Docker image build step to build-and-publish workflow
2 parents 44c5f4b + 1e3edb0 commit d6dfd25

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)