From 72ecb2f589c91998e20b2fb4222d7bda573c2e55 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Fri, 4 Oct 2024 09:47:44 +0200 Subject: [PATCH] deploy axum example --- .github/workflows/publish.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7948ea5fd..d9a89832d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -119,3 +119,22 @@ jobs: context: . push: true tags: ghcr.io/hermit-os/tls:latest + - name: Build axum + run: cargo build -Zbuild-std=std,panic_abort --target x86_64-unknown-hermit -p axum-example --features hermit/dhcpv4 --release + - name: Copy axum out of target dir + run: cp target/x86_64-unknown-hermit/release/axum-example . + - name: Create dockerfile for axum + run: | + cat << END > Dockerfile + FROM scratch + COPY hermit-loader-x86_64 hermit/hermit-loader + COPY hermit-loader-x86_64-fc hermit/hermit-loader-fc + COPY axum-example hermit/axum-example + CMD ["/hermit/axum-example"] + END + - name: Build and push container + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ghcr.io/hermit-os/axum-example:latest