Merge pull request 'Update for ci build' (#1) from feature/CI into master

Reviewed-on: StrafesNET/asset-tool#1
This commit is contained in:
Quaternions 2024-07-08 20:39:48 +00:00
commit 0d92221a27
3 changed files with 29 additions and 3 deletions

24
.drone.yml Normal file
View File

@ -0,0 +1,24 @@
---
kind: pipeline
type: docker
platform:
os: linux
arch: amd64
steps:
- name: image
image: plugins/docker
settings:
registry: git.itzana.me
repo: git.itzana.me/strafesnet/asset-tool
tags:
- latest
username:
from_secret: GIT_USER
password:
from_secret: GIT_PASS
dockerfile: Containerfile
when:
branch:
- master

View File

@ -1,6 +1,6 @@
# Using the `rust-musl-builder` as base image, instead of # Using the `rust-musl-builder` as base image, instead of
# the official Rust toolchain # the official Rust toolchain
FROM clux/muslrust:stable AS chef FROM docker.io/clux/muslrust:stable AS chef
USER root USER root
RUN cargo install cargo-chef RUN cargo install cargo-chef
WORKDIR /app WORKDIR /app
@ -16,8 +16,8 @@ RUN cargo chef cook --release --target x86_64-unknown-linux-musl --recipe-path r
COPY . . COPY . .
RUN cargo build --release --target x86_64-unknown-linux-musl --bin asset-tool RUN cargo build --release --target x86_64-unknown-linux-musl --bin asset-tool
FROM alpine AS runtime FROM docker.io/alpine:latest AS runtime
RUN addgroup -S myuser && adduser -S myuser -G myuser RUN addgroup -S myuser && adduser -S myuser -G myuser
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/asset-tool /usr/local/bin/ COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/asset-tool /usr/local/bin/
USER myuser USER myuser
CMD ["/usr/local/bin/asset-tool"] ENTRYPOINT ["/usr/local/bin/asset-tool"]

View File

@ -1,3 +1,5 @@
# asset-tool # asset-tool
[![Build Status](https://ci.itzana.me/api/badges/StrafesNET/asset-tool/status.svg?ref=refs/heads/master)](https://ci.itzana.me/StrafesNET/asset-tool)
For uploading and downloading roblox assets. For uploading and downloading roblox assets.