File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #!/usr/bin/env -S pkgx +podman bash>=4
2+ source <(pkgx dev --shellcode)
3+ set -euo pipefail
4+
5+ IMAGE_TAG="elixir_script:audit"
6+
7+ echo "Building Docker image..."
8+ podman build -f .github/Dockerfile -t "$IMAGE_TAG" .
9+
10+ echo "Testing Docker image..."
11+ # Test --help works
12+ OUTPUT=$(podman run --rm "$IMAGE_TAG" --help)
13+ if echo "$OUTPUT" | grep -q "Usage:"; then
14+ echo "✓ Docker image builds and runs successfully"
15+ else
16+ echo >&2 "✗ Docker image test failed"
17+ echo >&2 "$OUTPUT"
18+ exit 1
19+ fi
20+
21+ ## Optional: test with a simple script
22+ #echo "Running smoke test..."
23+ #OUTPUT=$(podman run --rm -e INPUT_SCRIPT='IO.puts("Docker smoke test OK")' "$IMAGE_TAG" 2>&1)
24+ #if echo "$OUTPUT" | grep -q "Docker smoke test OK"; then
25+ # echo "✓ Smoke test passed"
26+ #else
27+ # echo >&2 "✗ Smoke test failed"
28+ # echo >&2 "$OUTPUT"
29+ # exit 1
30+ #fi
You can’t perform that action at this time.
0 commit comments