From 64b288718d7d80fa569990e140ce76b900464a38 Mon Sep 17 00:00:00 2001 From: hexlocation pc Date: Fri, 12 Jul 2024 21:56:23 +0200 Subject: [PATCH] feat: automatic CI --- .woodpecker.yaml | 17 +++++++++++++++++ Dockerfile | 14 ++++++++++++++ guests.json | 1 - 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .woodpecker.yaml create mode 100644 Dockerfile delete mode 100644 guests.json diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..23f167e --- /dev/null +++ b/.woodpecker.yaml @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..883ac36 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/guests.json b/guests.json deleted file mode 100644 index 8294d9c..0000000 --- a/guests.json +++ /dev/null @@ -1 +0,0 @@ -{"messages":[{"body":"b","date":"2024-0712 | 21:34","name":"a "}]} \ No newline at end of file