build: remove woodpecker CI usage
This commit is contained in:
parent
b47ee56ec8
commit
38f3212e2a
6 changed files with 25 additions and 67 deletions
|
@ -37,3 +37,26 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
docker:
|
||||||
|
name: Docker image
|
||||||
|
runs-on: docker
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
docker build . -t git.kemitix.net/kemitix/rust:latest
|
||||||
|
docker tag git.kemitix.net/kemitix/rust:latest git.kemitix.net/kemitix/rust:${{ env.GITHUB_REF_NAME }}
|
||||||
|
|
||||||
|
- name: Login
|
||||||
|
run: docker login --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }} git.kemitix.net
|
||||||
|
|
||||||
|
- name: Publish
|
||||||
|
run: |
|
||||||
|
docker push git.kemitix.net/kemitix/rust:${{ env.GITHUB_REF_NAME }}
|
||||||
|
docker push git.kemitix.net/kemitix/rust:latest
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
steps:
|
|
||||||
|
|
||||||
update-builder-image:
|
|
||||||
when:
|
|
||||||
- event: cron
|
|
||||||
image: docker.io/woodpeckerci/plugin-docker-buildx:latest
|
|
||||||
settings:
|
|
||||||
username: kemitix
|
|
||||||
repo: git.kemitix.net/kemitix/git-next-builder
|
|
||||||
auto_tag: true
|
|
||||||
dockerfile: Dockerfile.builder
|
|
||||||
dry-run: false # push to remote repo
|
|
||||||
registry: git.kemitix.net
|
|
||||||
password:
|
|
||||||
from_secret: woodpecker-docker-push
|
|
|
@ -1,13 +0,0 @@
|
||||||
steps:
|
|
||||||
docker-build:
|
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
branch: next
|
|
||||||
# INFO: https://woodpecker-ci.org/plugins/Docker%20Buildx
|
|
||||||
image: docker.io/woodpeckerci/plugin-docker-buildx:5.1.0
|
|
||||||
settings:
|
|
||||||
username: kemitix
|
|
||||||
repo: git.kemitix.net/kemitix/git-next
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
auto_tag: false
|
|
||||||
dry-run: true # don't push to remote repo
|
|
|
@ -1,16 +0,0 @@
|
||||||
steps:
|
|
||||||
docker-build:
|
|
||||||
when:
|
|
||||||
- event: tag
|
|
||||||
ref: refs/tags/v*
|
|
||||||
# INFO: https://woodpecker-ci.org/plugins/Docker%20Buildx
|
|
||||||
image: docker.io/woodpeckerci/plugin-docker-buildx:5.1.0
|
|
||||||
settings:
|
|
||||||
username: kemitix
|
|
||||||
repo: git.kemitix.net/kemitix/git-next
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
auto_tag: true
|
|
||||||
dry-run: false # push to remote repo
|
|
||||||
registry: git.kemitix.net
|
|
||||||
password:
|
|
||||||
from_secret: woodpecker-docker-push
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Leveraging the pre-built Docker images with
|
# Leveraging the pre-built Docker images with
|
||||||
# cargo-chef and the Rust toolchain
|
# cargo-chef and the Rust toolchain
|
||||||
FROM git.kemitix.net/kemitix/git-next-builder:2024.12.28 AS chef
|
FROM git.kemitix.net/kemitix/rust:v3.0.0 AS chef
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
FROM chef AS planner
|
FROM chef AS planner
|
||||||
|
@ -15,7 +15,7 @@ COPY . .
|
||||||
RUN cargo build --release --bin git-next --all-features && \
|
RUN cargo build --release --bin git-next --all-features && \
|
||||||
strip target/release/git-next
|
strip target/release/git-next
|
||||||
|
|
||||||
FROM docker.io/debian:stable-20240904-slim AS runtime
|
FROM docker.io/debian:stable-20241223-slim AS runtime
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get satisfy -y "git (>=2.39), libssl3 (>=3.0.14), libdbus-1-dev (>=1.14.10), ca-certificates (>=20230311)" \
|
apt-get satisfy -y "git (>=2.39), libssl3 (>=3.0.14), libdbus-1-dev (>=1.14.10), ca-certificates (>=20230311)" \
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
FROM docker.io/rust:1.84.0-bookworm
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y libdbus-1-dev && \
|
|
||||||
curl -L https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \
|
|
||||||
tar -xzf cargo-binstall.tgz && \
|
|
||||||
rm cargo-binstall.tgz && \
|
|
||||||
mv cargo-binstall /usr/local/bin/ && \
|
|
||||||
cargo binstall -y cargo-chef && \
|
|
||||||
rustup component add rustfmt clippy
|
|
||||||
|
|
||||||
# verify that the binaries are installed
|
|
||||||
RUN ls -l /usr/local/cargo/bin/
|
|
||||||
RUN cargo chef --version
|
|
||||||
RUN rustfmt --version
|
|
||||||
RUN cargo fmt --version
|
|
||||||
RUN cargo clippy --version
|
|
||||||
RUN cargo --version
|
|
||||||
RUN rustc --version
|
|
||||||
RUN rustup --version
|
|
||||||
RUN rustup show
|
|
Loading…
Add table
Reference in a new issue