From 8c676f6135f2ce6aa95043a4baec87eadcba55b2 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Sat, 7 Sep 2024 18:58:37 +0200 Subject: [PATCH] feat: Initial commit Signed-off-by: Louis Vallat --- .gitea/workflows/deploy_rust_bookworm.yml | 36 +++++++++++++++++++++++ rust-bookworm/Dockerfile | 8 +++++ 2 files changed, 44 insertions(+) create mode 100644 .gitea/workflows/deploy_rust_bookworm.yml create mode 100644 rust-bookworm/Dockerfile diff --git a/.gitea/workflows/deploy_rust_bookworm.yml b/.gitea/workflows/deploy_rust_bookworm.yml new file mode 100644 index 0000000..1ca470f --- /dev/null +++ b/.gitea/workflows/deploy_rust_bookworm.yml @@ -0,0 +1,36 @@ +name: "Build and deploy Rust on Bookworm image" +defaults: + run: + shell: sh +on: + push: + branches: + - master + # paths: + # - rust-bookworm/** + +jobs: + publish-image: + name: "Build and deploy" + runs-on: alpine + steps: + - name: Install dependencies + run: apk add git docker + - name: Check out repository code + uses: actions/checkout@v4 + - name: Login to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: git.louis-vallat.dev + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: ./rust-bookworm + file: ./rust-bookworm/Dockerfile + platforms: | + linux/amd64 + push: true + tags: | + git.louis-vallat.dev/${{ github.repository }}:latest diff --git a/rust-bookworm/Dockerfile b/rust-bookworm/Dockerfile new file mode 100644 index 0000000..7122c4a --- /dev/null +++ b/rust-bookworm/Dockerfile @@ -0,0 +1,8 @@ +FROM node:20-bookworm@sha256:48db4f6ea21d134be744207225753a1730c4bc1b4cdf836d44511c36bf0e34d7 + +ENV PATH="/root/.cargo/bin:$PATH" + +RUN apt-get update && \ + apt-get install git && \ + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ + rm -rf /var/lib/apt/lists/*