use gitea actions
Some checks failed
Build Multiarch Container Image / call-reusable-workflow (push) Has been cancelled

This commit is contained in:
Sebastian Hugentobler 2023-12-15 07:57:54 +01:00
parent 75c5a47449
commit 92f7a489fb
Signed by: shu
GPG key ID: BB32CF3CA052C2F0
3 changed files with 15 additions and 17 deletions

View file

@ -1,26 +1,23 @@
FROM docker.io/rust:1-alpine3.18 AS builder
ARG ARCH=x86_64
RUN apk --no-cache add musl-dev
ENV CARGO_CARGO_NEW_VCS="none"
ENV CARGO_BUILD_RUSTFLAGS="-C target-feature=+crt-static"
ENV CARGO_BUILD_TARGET="$ARCH-unknown-linux-musl"
WORKDIR /work
RUN cargo init
COPY Cargo.toml Cargo.lock ./
RUN cargo build --release
RUN cargo build --release --target=$(arch)-unknown-linux-musl
COPY . .
# ensure rebuilding of the app
RUN touch src/main.rs
RUN cargo build --release
RUN cp "./target/$CARGO_BUILD_TARGET/release/findpenguins-feed" /app
RUN cargo build --release --target=$(arch)-unknown-linux-musl
RUN cp "./target/$(arch)-unknown-linux-musl/release/findpenguins-feed" /app
FROM scratch