diff --git a/.woodpecker.yml b/.woodpecker.yml index 65dc8a8a6..6fcc58582 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -79,9 +79,11 @@ steps: cargo_machete: image: rustlang/rust:nightly commands: + # Install cargo binstall - wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz - tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz - cp cargo-binstall /usr/local/cargo/bin + # Install cargo-machete - cargo binstall -y cargo-machete - cargo machete when: @@ -133,11 +135,17 @@ steps: when: *slow_check_paths check_diesel_schema: - image: willsquire/diesel-cli + image: *rust_image environment: CARGO_HOME: .cargo_home DATABASE_URL: postgres://lemmy:password@database:5432/lemmy commands: + # Install cargo binstall + - wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz + - tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz + - cp cargo-binstall /usr/local/cargo/bin + # Install diesel_cli + - cargo binstall -y diesel_cli --no-default-features --features postgres - diesel migration run - diesel print-schema --config-file=diesel.toml > tmp.schema - diff tmp.schema crates/db_schema/src/schema.rs @@ -197,7 +205,12 @@ steps: PGHOST: database PGDATABASE: lemmy commands: - - cargo install diesel_cli + # Install cargo binstall + - wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz + - tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz + - cp cargo-binstall /usr/local/cargo/bin + # Install diesel_cli + - cargo binstall -y diesel_cli --no-default-features --features postgres - export PATH="$CARGO_HOME/bin:$PATH" # Run all migrations - diesel migration run @@ -276,7 +289,12 @@ steps: publish_to_crates_io: image: *rust_image commands: - - cargo install cargo-workspaces + # Install cargo binstall + - wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz + - tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz + - cp cargo-binstall /usr/local/cargo/bin + # Install cargo-workspaces + - cargo binstall -y cargo-workspaces - cp -r migrations crates/db_schema/ - cargo workspaces publish --token "$CARGO_API_TOKEN" --from-git --allow-dirty --no-verify --allow-branch "${CI_COMMIT_TAG}" --yes custom "${CI_COMMIT_TAG}" secrets: [cargo_api_token]