From d28a24b855e2fbd43a3f0e4b52253561c6b63098 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 3 Feb 2024 20:19:28 +0100 Subject: [PATCH] feat: add .drone Signed-off-by: kjuulh --- .drone.yml | 192 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..ff95a16 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,192 @@ +kind: pipeline +name: default +type: docker + +steps: + - name: build ci + image: rustlang/rust:nightly + volumes: + - name: ci + path: /mnt/ci + environment: + PKG_CONFIG_SYSROOT_DIR: "/" + CI_PREFIX: "/mnt/ci" + commands: + - set -e + - apt update + - apt install musl-tools pkg-config libssl-dev openssl build-essential musl-dev -y + - rustup target add x86_64-unknown-linux-musl + - cargo build --target=x86_64-unknown-linux-musl -p ci --bin ci + - mv target/x86_64-unknown-linux-musl/debug/ci "$CI_PREFIX/ci" + + - name: load_secret + image: debian:buster-slim + volumes: + - name: ssh + path: /root/.ssh/ + environment: + SSH_KEY: + from_secret: gitea_id_ed25519 + commands: + - mkdir -p $HOME/.ssh/ + - echo "$SSH_KEY" | base64 -d > $HOME/.ssh/id_ed25519 + - chmod -R 600 ~/.ssh + - | + cat >$HOME/.ssh/config <