From 61d14e25a41072a27fc88a97aa6397d75bbc6c7e Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Sun, 21 Jan 2024 12:43:29 -0500 Subject: [PATCH] Fix ci --- .woodpecker/.container.yml | 19 +++++++++++++++++++ .woodpecker/.docker.yml | 20 -------------------- Dockerfile | 4 ++-- 3 files changed, 21 insertions(+), 22 deletions(-) create mode 100644 .woodpecker/.container.yml delete mode 100644 .woodpecker/.docker.yml diff --git a/.woodpecker/.container.yml b/.woodpecker/.container.yml new file mode 100644 index 0000000..749b87f --- /dev/null +++ b/.woodpecker/.container.yml @@ -0,0 +1,19 @@ +steps: + publish: + image: woodpeckerci/plugin-docker-buildx + settings: + #platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x + platforms: linux/amd64,linux/arm64 + repo: ${CI_FORGE_URL:8}/${CI_REPO_OWNER,,}/${CI_REPO_NAME,,} # lowercase + registry: ${CI_FORGE_URL:8} # url of gitea, minus the https:// + tags: + - ${CI_COMMIT_SHA:0:8} # first 8 characters of var + - rolling + - rolling-${CI_COMMIT_SHA:0:8} + username: ${CI_REPO_OWNER,,} # lowercase username + password: + from_secret: registry_token + when: + event: [push, manual] + branch: main + \ No newline at end of file diff --git a/.woodpecker/.docker.yml b/.woodpecker/.docker.yml deleted file mode 100644 index 0b45e42..0000000 --- a/.woodpecker/.docker.yml +++ /dev/null @@ -1,20 +0,0 @@ -when: - branch: ${CI_REPO_DEFAULT_BRANCH} - event: push - -steps: - publish: - image: woodpeckerci/plugin-docker-buildx - settings: - #platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x - platforms: linux/amd64,linux/arm/v6,linux/arm64/v8 - repo: ${CI_REPO_URL} # url to repository - registry: ${CI_FORGE_URL} # url of gitea - tags: - - ${CI_COMMIT_SHA:0:8} # first 8 characters of var - - rolling - - rolling@${CI_COMMIT_SHA:0:8} - username: ${CI_REPO_OWNER} - password: - from_secret: registry_token - diff --git a/Dockerfile b/Dockerfile index af50fc7..2425be8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:alpine3.17 as builder +FROM rust:1.75-alpine as builder # update packages RUN apk update @@ -22,7 +22,7 @@ RUN sh -c "cargo build --release" # Runner stage. I tried using distroless (gcr.io/distroless/static-debian11), but the image was only ~3MBs smaller than # alpine. I chose to use alpine since it makes it easier to exec into the container to debug things. -FROM alpine:3.17 +FROM rust:1.75-alpine ARG UNAME=exporter ARG UID=1000