feat: automatic CI

This commit is contained in:
hexlocation pc 2024-07-12 21:56:23 +02:00
parent db01e0494f
commit 64b288718d
3 changed files with 31 additions and 1 deletions

17
.woodpecker.yaml Normal file
View file

@ -0,0 +1,17 @@
when:
branch: ['dev', 'stable']
event: ["push", "manual"]
steps:
- name: build
image: woodpeckerci/plugin-docker-buildx
secrets: [ gitpat ]
settings:
repo: git.iwakura.rip/hex/iwakura-web
platforms: linux/amd64
dockerfile: Dockerfile
tags: ["${CI_COMMIT_BRANCH}-latest","${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA}"]
username: hex
registry: git.iwakura.rip
#insecure: true
password:
from_secret: gitpat

14
Dockerfile Normal file
View file

@ -0,0 +1,14 @@
FROM rust:1.19 as compile
WORKDIR /build
COPY . .
RUN cargo build --release
FROM gcr.io/distroless/static-debian12
WORKDIR /app
COPY --from=compile /build/target/release/iwakura-web /bin/server
COPY --from=compile /build/assets /app/assets
CMD ["/bin/server"]

View file

@ -1 +0,0 @@
{"messages":[{"body":"b","date":"2024-0712 | 21:34","name":"a "}]}