1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-08 06:45:32 +00:00

Merge pull request #6 from imjasonh/feat/detect-base-image-platforms

chore: Add alpine-base example for multi-platform testing
This commit is contained in:
Jason Hall 2025-06-08 00:46:22 -04:00 committed by GitHub
commit a056514f48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 18 deletions

View file

@ -200,25 +200,8 @@ jobs:
run: cargo build --release
- name: Test multi-platform build with Alpine base
run: |
# Create a test project that uses Alpine (which supports many platforms)
mkdir -p test-alpine-platforms/src
cat > test-alpine-platforms/Cargo.toml << 'EOF'
[package]
name = "test-alpine"
version = "0.1.0"
edition = "2021"
[package.metadata.krust]
base-image = "alpine:latest"
EOF
cat > test-alpine-platforms/src/main.rs << 'EOF'
fn main() {
println!("Hello from Alpine multi-platform test!");
}
EOF
# Test that platform detection works (even if we can't build all platforms)
cd test-alpine-platforms
cd example/alpine-base
../target/release/krust build --no-push --image test.local/alpine-test:latest . 2>&1 | tee build.log
# Verify platform detection happened

View file

@ -0,0 +1,7 @@
[package]
name = "test-alpine"
version = "0.1.0"
edition = "2021"
[package.metadata.krust]
base-image = "alpine:latest"

View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello from Alpine multi-platform test!");
}