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

@ -0,0 +1,12 @@
name: Build Multiarch Container Image
on: [push]
jobs:
call-reusable-workflow:
uses: container/multiarch-build-workflow/.gitea/workflows/build.yaml@main
with:
repository: ${{ gitea.repository }}
ref_name: ${{ gitea.ref_name }}
sha: ${{ gitea.sha }}
registry_url: ${{ secrets.REGISTRY_URL }}
registry_user: ${{ secrets.REGISTRY_USER }}
registry_pw: ${{ secrets.REGISTRY_PW }}

View File

@ -1,11 +0,0 @@
pipeline:
publish-docker-image:
image: plugins/kaniko
settings:
repo: docker.io/thallian/fp-feed
tags: latest,${CI_COMMIT_SHA:0:8},${CI_COMMIT_TAG=pre}
dockerfile: Containerfile
username:
from_secret: DOCKER_USER
password:
from_secret: DOCKER_PW

View File

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