From 7b8d4a32df89669bdac398ff4f74e60b6dd7300e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 14 Nov 2024 10:30:25 +0000 Subject: [PATCH 01/46] fix: revert only updating toolchain if nightly --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index c0946df..195dda1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,8 +15,6 @@ echo "Default toolchain: ${TOOLCHAIN}" if test "${ARGS[0]}" == "nightly"; then TOOLCHAIN="nightly" ARGS=("${ARGS[@]:1}") - echo ">>> Update nightly toolchain" - rustup update "${TOOLCHAIN}" fi if test "${ARGS[0]}" == "stable"; then TOOLCHAIN="stable" # redundant as this is the default @@ -28,6 +26,8 @@ if [[ "${ARGS[0]}" == v1* ]]; then fi echo "Selected toolchain: ${TOOLCHAIN}" +echo ">>> Update toolchain" +rustup update "${TOOLCHAIN}" echo ">>> Install rustfmt and clippy" rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy From 1e5a6defe266c593a48f360107e78f2bcbf50b24 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 14 Nov 2024 09:17:34 +0000 Subject: [PATCH 02/46] build: bump rust action to 2.4.1 --- .forgejo/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index f6502a7..f834ddb 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -16,31 +16,31 @@ jobs: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: ${{ matrix.toolchain.name }} cargo fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: ${{ matrix.toolchain.name }} cargo clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: ${{ matrix.toolchain.name }} cargo test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: ${{ matrix.toolchain.name }} cargo build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: ${{ matrix.toolchain.name }} cargo run From 19070a34b89842fdd7774f4906ea21dd671d4a50 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 2 Dec 2024 22:03:01 +0000 Subject: [PATCH 03/46] chore(deps): update docker.io/rust docker tag to v1.83.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aac1d00..c1986b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rust:1.82.0-slim-bookworm +FROM docker.io/rust:1.83.0-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall From fcf7e37076f824e9422bee8524ce5075d6ce7d10 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 2 Dec 2024 23:03:32 +0000 Subject: [PATCH 04/46] chore(deps): update kemitix/rust action to v2.5.0 --- .forgejo/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index f834ddb..0883f3f 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -16,31 +16,31 @@ jobs: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: ${{ matrix.toolchain.name }} cargo fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: ${{ matrix.toolchain.name }} cargo clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: ${{ matrix.toolchain.name }} cargo test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: ${{ matrix.toolchain.name }} cargo build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: ${{ matrix.toolchain.name }} cargo run From 1af6efe6e2dc0ff651d84c4f8b5f86a0307a357f Mon Sep 17 00:00:00 2001 From: kemitix Date: Thu, 9 Jan 2025 17:26:55 +0000 Subject: [PATCH 05/46] chore(deps): update docker.io/rust docker tag to v1.84.0 Includes updating cargo-binstall to 1.10.19 --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c1986b1..1a51982 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rust:1.83.0-slim-bookworm +FROM docker.io/rust:1.84.0-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall @@ -13,7 +13,7 @@ RUN apt-get update \ && \ rm -r /var/lib/apt/lists/* -RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.12/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ +RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/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/ @@ -22,7 +22,7 @@ RUN cargo binstall -y \ cargo-chef@0.1 \ cargo-hack@0.6 \ cargo-machete@0.7 \ - cargo-mutants@24.11 \ + cargo-mutants@25.0 \ release-plz@0.3 COPY entrypoint.sh / From 961c02bcf9b875a8512d7017fb90bcd52b3026bc Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 9 Jan 2025 17:43:03 +0000 Subject: [PATCH 06/46] chore(deps): update https://git.kemitix.net/kemitix/rust action to v2.5.1 --- .forgejo/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 0883f3f..d459ae6 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -16,31 +16,31 @@ jobs: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: ${{ matrix.toolchain.name }} cargo fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: ${{ matrix.toolchain.name }} cargo clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: ${{ matrix.toolchain.name }} cargo test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: ${{ matrix.toolchain.name }} cargo build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: ${{ matrix.toolchain.name }} cargo run From 5b2365e925af11e5f010ef3d9de9e585d0519153 Mon Sep 17 00:00:00 2001 From: kemitix Date: Thu, 9 Jan 2025 17:26:55 +0000 Subject: [PATCH 07/46] build: build and publish image nightly Removes need to update toolchain for every action step --- .forgejo/workflows/build-image.yml | 18 +++++++++++++++++ Dockerfile | 9 +++++++++ entrypoint.sh | 5 ----- update.sh | 32 ++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 .forgejo/workflows/build-image.yml create mode 100755 update.sh diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml new file mode 100644 index 0000000..452dd89 --- /dev/null +++ b/.forgejo/workflows/build-image.yml @@ -0,0 +1,18 @@ +on: + schedule: + - cron: '30 1 * * *' + workflow_dispatch: + +jobs: + build: + runs-on: docker + + steps: + - name: Checkout + uses: actions/checkoutv4 + + - name: Build + run: docker build . -t git.kemitix.net/kemitix/rust:latest + + - name: Publish + run: docker push git.kemitix.net/kemitix/rust:latest diff --git a/Dockerfile b/Dockerfile index 1a51982..6abceb7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM docker.io/rust:1.84.0-slim-bookworm +LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust + # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall # clang-16 & mold - faster linkers for rust @@ -25,6 +27,13 @@ RUN cargo binstall -y \ cargo-mutants@25.0 \ release-plz@0.3 +COPY update.sh / + +# should be a no-op if the FROM line is up-to-date +RUN /update.sh stable + +RUN /update.sh nightly + COPY entrypoint.sh / RUN git config --global user.email "action@git.kemitix.net" && \ diff --git a/entrypoint.sh b/entrypoint.sh index 195dda1..7971454 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,11 +26,6 @@ if [[ "${ARGS[0]}" == v1* ]]; then fi echo "Selected toolchain: ${TOOLCHAIN}" -echo ">>> Update toolchain" -rustup update "${TOOLCHAIN}" -echo ">>> Install rustfmt and clippy" -rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy - if test "${ARGS[0]}" == "cargo";then PRE_COMMAND="cargo +${TOOLCHAIN} " else diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..957870d --- /dev/null +++ b/update.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -e + +echo "INPUT_ARGS: ${INPUT_ARGS}" + +# split input into an array +read -ra ARGS <<<"${INPUT_ARGS}" + +# default toolchain +TOOLCHAIN="stable" +echo "Default toolchain: ${TOOLCHAIN}" + +# if first parameter is 'nightly'... +if test "${ARGS[0]}" == "nightly"; then + TOOLCHAIN="nightly" + ARGS=("${ARGS[@]:1}") +fi +if test "${ARGS[0]}" == "stable"; then + TOOLCHAIN="stable" # redundant as this is the default + ARGS=("${ARGS[@]:1}") +fi +if [[ "${ARGS[0]}" == v1* ]]; then + TOOLCHAIN="${ARGS[0]:1}" + ARGS=("${ARGS[@]:1}") +fi +echo "Selected toolchain: ${TOOLCHAIN}" + +echo ">>> Update toolchain" +rustup update "${TOOLCHAIN}" +echo ">>> Install rustfmt and clippy" +rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy From d9d3dd6bf7622df981b766d646e47aa0786bca52 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 10 Jan 2025 20:27:27 +0000 Subject: [PATCH 08/46] build: fix typo --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 452dd89..c8ec64d 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -9,7 +9,7 @@ jobs: steps: - name: Checkout - uses: actions/checkoutv4 + uses: actions/checkout@v4 - name: Build run: docker build . -t git.kemitix.net/kemitix/rust:latest From 8019e1e24714f034bca1f6fd7aecd9d135fad11f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 10 Jan 2025 20:59:47 +0000 Subject: [PATCH 09/46] build: run action on dind --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index c8ec64d..f9cac07 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -5,7 +5,7 @@ on: jobs: build: - runs-on: docker + runs-on: dind steps: - name: Checkout From 17860073ec4a31a228d054413a05e6c7e02bd440 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 10 Jan 2025 21:12:04 +0000 Subject: [PATCH 10/46] build: run on ubuntu-latest --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index f9cac07..a6edeaf 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -5,7 +5,7 @@ on: jobs: build: - runs-on: dind + runs-on: ubuntu-latest steps: - name: Checkout From 4179c0c716423955d81c6f598b105800aa8b0ccb Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 08:15:40 +0000 Subject: [PATCH 11/46] build: add docker login step --- .forgejo/workflows/build-image.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index a6edeaf..e58a640 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -14,5 +14,8 @@ jobs: - name: Build run: docker build . -t git.kemitix.net/kemitix/rust:latest + - name: Login + run: docker login git.kemitix.net + - name: Publish run: docker push git.kemitix.net/kemitix/rust:latest From 6e8d6b6e63e7b037c45980f3fcad1d497fd2f4b1 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 16:56:07 +0000 Subject: [PATCH 12/46] build: use credentials to login --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index e58a640..931e1b1 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -15,7 +15,7 @@ jobs: run: docker build . -t git.kemitix.net/kemitix/rust:latest - name: Login - run: docker login git.kemitix.net + run: docker login --username kemitix --password ${FORGE_USER_PASSWORD} git.kemitix.net - name: Publish run: docker push git.kemitix.net/kemitix/rust:latest From 362a4cd064d543669e2322d120ec1ab79cd646af Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 17:05:37 +0000 Subject: [PATCH 13/46] build: get password from secrets --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 931e1b1..f3c267b 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -15,7 +15,7 @@ jobs: run: docker build . -t git.kemitix.net/kemitix/rust:latest - name: Login - run: docker login --username kemitix --password ${FORGE_USER_PASSWORD} git.kemitix.net + run: docker login --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }} git.kemitix.net - name: Publish run: docker push git.kemitix.net/kemitix/rust:latest From 2820a223b46a4f9cdf5443c62ae78317a3ec096b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 17:10:52 +0000 Subject: [PATCH 14/46] build: add 'mise run test' --- .gitignore | 1 + mise.toml | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 mise.toml diff --git a/.gitignore b/.gitignore index ea8c4bf..96ef6c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +Cargo.lock diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..0d130ca --- /dev/null +++ b/mise.toml @@ -0,0 +1,10 @@ +[tasks.test] +description = "Test the image" +run = [ + "cargo machete", + "cargo fmt --check", + "cargo clippy", + "cargo test", + "cargo build", + "cargo run" +] From 0a69149418fe493dc30b214dbd54dd85eb21cdb6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 18:17:18 +0000 Subject: [PATCH 15/46] build: install nightly --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6abceb7..d7f28aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ COPY update.sh / # should be a no-op if the FROM line is up-to-date RUN /update.sh stable -RUN /update.sh nightly +RUN rustup install nightly && /update.sh nightly COPY entrypoint.sh / From 1a5bd83c1e9ba8e7e1e963db96c9bc9b99dfae79 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 18:23:57 +0000 Subject: [PATCH 16/46] build: clear previous version from cache --- .forgejo/workflows/build-image.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index f3c267b..2ddc177 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -11,6 +11,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Clear image from cache + run: | + docker rmi git.kemitix.net/kemitix/rust:latest + docker system prune --force --all + - name: Build run: docker build . -t git.kemitix.net/kemitix/rust:latest From 856cce5c03be03ce2ae811afb6c3af19b3538a64 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 20:04:51 +0000 Subject: [PATCH 17/46] build: install nightly and v1.74.1 directly in dockerfile Switching test from 1.81.0 to 1.74.1 to match an MSRV that I actually use. --- .forgejo/workflows/test.yml | 2 +- Dockerfile | 10 ++++++---- update.sh | 32 -------------------------------- 3 files changed, 7 insertions(+), 37 deletions(-) delete mode 100755 update.sh diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index d459ae6..3058125 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -10,7 +10,7 @@ jobs: toolchain: - name: stable - name: nightly - - name: v1.81.0 + - name: v1.74.1 steps: - uses: actions/checkout@v4 diff --git a/Dockerfile b/Dockerfile index d7f28aa..fcd27d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,12 +27,14 @@ RUN cargo binstall -y \ cargo-mutants@25.0 \ release-plz@0.3 -COPY update.sh / - # should be a no-op if the FROM line is up-to-date -RUN /update.sh stable +RUN rustup update stable && rustup component add --toolchain stable rustfmt clippy -RUN rustup install nightly && /update.sh nightly +# install nightly +RUN rustup install nightly && rustup component add --toolchain nightly rustfmt clippy + +# install v1.74.1 +RUN rustup install 1.74.1 && rustup component add --toolchain 1.74.1 rustfmt clippy COPY entrypoint.sh / diff --git a/update.sh b/update.sh deleted file mode 100755 index 957870d..0000000 --- a/update.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo "INPUT_ARGS: ${INPUT_ARGS}" - -# split input into an array -read -ra ARGS <<<"${INPUT_ARGS}" - -# default toolchain -TOOLCHAIN="stable" -echo "Default toolchain: ${TOOLCHAIN}" - -# if first parameter is 'nightly'... -if test "${ARGS[0]}" == "nightly"; then - TOOLCHAIN="nightly" - ARGS=("${ARGS[@]:1}") -fi -if test "${ARGS[0]}" == "stable"; then - TOOLCHAIN="stable" # redundant as this is the default - ARGS=("${ARGS[@]:1}") -fi -if [[ "${ARGS[0]}" == v1* ]]; then - TOOLCHAIN="${ARGS[0]:1}" - ARGS=("${ARGS[@]:1}") -fi -echo "Selected toolchain: ${TOOLCHAIN}" - -echo ">>> Update toolchain" -rustup update "${TOOLCHAIN}" -echo ">>> Install rustfmt and clippy" -rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy From cb915104cbb2f2f5d33f443441108a590f53f4bd Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 20:18:43 +0000 Subject: [PATCH 18/46] build: bump rust action to 2.6.0-rc3 --- .forgejo/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 3058125..590229b 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -16,31 +16,31 @@ jobs: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: ${{ matrix.toolchain.name }} cargo fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: ${{ matrix.toolchain.name }} cargo clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: ${{ matrix.toolchain.name }} cargo test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: ${{ matrix.toolchain.name }} cargo build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: ${{ matrix.toolchain.name }} cargo run From da790827d486009d2f5252de9d097ff5c2968ead Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 11:18:19 +0000 Subject: [PATCH 19/46] feat: drop entrypoint in favour of using 'run' over 'uses' --- .forgejo/workflows/test.yml | 29 +++++++++--------------- Dockerfile | 10 ++++----- entrypoint.sh | 45 ------------------------------------- 3 files changed, 14 insertions(+), 70 deletions(-) delete mode 100755 entrypoint.sh diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 590229b..307fdfb 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -5,42 +5,33 @@ on: jobs: test: runs-on: docker + container: + image: + git.kemitix.net/kemitix/rust:v3.0.0-rc2 strategy: matrix: toolchain: - name: stable - name: nightly - - name: v1.74.1 + - name: 1.74.1 steps: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: cargo machete + run: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: ${{ matrix.toolchain.name }} cargo fmt --check + run: cargo +${{ matrix.toolchain.name }} fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: ${{ matrix.toolchain.name }} cargo clippy + run: cargo +${{ matrix.toolchain.name }} clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: ${{ matrix.toolchain.name }} cargo test + run: cargo +${{ matrix.toolchain.name }} test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: ${{ matrix.toolchain.name }} cargo build + run: cargo +${{ matrix.toolchain.name }} build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: ${{ matrix.toolchain.name }} cargo run + run: cargo +${{ matrix.toolchain.name }} run diff --git a/Dockerfile b/Dockerfile index fcd27d4..23b5fdd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,18 +27,16 @@ RUN cargo binstall -y \ cargo-mutants@25.0 \ release-plz@0.3 +# install v1.74.1 +RUN rustup install 1.74.1 && rustup component add --toolchain 1.74.1 rustfmt clippy + # should be a no-op if the FROM line is up-to-date RUN rustup update stable && rustup component add --toolchain stable rustfmt clippy # install nightly RUN rustup install nightly && rustup component add --toolchain nightly rustfmt clippy -# install v1.74.1 -RUN rustup install 1.74.1 && rustup component add --toolchain 1.74.1 rustfmt clippy - -COPY entrypoint.sh / - RUN git config --global user.email "action@git.kemitix.net" && \ git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" -ENTRYPOINT [ "/entrypoint.sh" ] +WORKDIR /app diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100755 index 7971454..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo "INPUT_ARGS: ${INPUT_ARGS}" - -# split input into an array -read -ra ARGS <<<"${INPUT_ARGS}" - -# default toolchain -TOOLCHAIN="stable" -echo "Default toolchain: ${TOOLCHAIN}" - -# if first parameter is 'nightly'... -if test "${ARGS[0]}" == "nightly"; then - TOOLCHAIN="nightly" - ARGS=("${ARGS[@]:1}") -fi -if test "${ARGS[0]}" == "stable"; then - TOOLCHAIN="stable" # redundant as this is the default - ARGS=("${ARGS[@]:1}") -fi -if [[ "${ARGS[0]}" == v1* ]]; then - TOOLCHAIN="${ARGS[0]:1}" - ARGS=("${ARGS[@]:1}") -fi -echo "Selected toolchain: ${TOOLCHAIN}" - -if test "${ARGS[0]}" == "cargo";then - PRE_COMMAND="cargo +${TOOLCHAIN} " -else - PRE_COMMAND="${ARGS[0]}" -fi -ARGS=("${ARGS[@]:1}") - -# ensure toolchain is up-to-date -# recombine remaining arguments -COMMAND=$( - IFS=" " - echo "${ARGS[*]}" -) - -# execute command -echo ">>> ${PRE_COMMAND} ${COMMAND}" -${PRE_COMMAND} ${COMMAND} From 766156841b016d2a80f1fa86c251d26dfe13bd46 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 11:18:19 +0000 Subject: [PATCH 20/46] feat: drop entrypoint in favour of using 'run' over 'uses' --- .forgejo/workflows/test.yml | 2 +- README.md | 36 ++++++++++++++---------------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 307fdfb..4a12799 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: docker container: image: - git.kemitix.net/kemitix/rust:v3.0.0-rc2 + git.kemitix.net/kemitix/rust:v3.0.0 strategy: matrix: toolchain: diff --git a/README.md b/README.md index 193c9bd..f3637c6 100644 --- a/README.md +++ b/README.md @@ -11,23 +11,25 @@ on: [push] jobs: test: runs-on: docker + container: + image: + git.kemitix.net/kemitix/rust:v3.0.0 steps: - - uses: https://git.kemitix.net/kemitix/rust@v2.4.0 - with: - args: nightly cargo test - - uses: https://git.kemitix.net/kemitix/rust@v2.4.0 - with: - args: v1.79.0 cargo build + - name: test with nightly + run: cargo +nightly test + - name: build with v1.74.1 + run: cargo +1.74.1 cargo build + - name: test with stable + run: cargo test ``` -The `args` is one of the following: +## Toolchains -- <COMMAND> -- [ nightly | stable | v1.xx.x ] <COMMAND> +The available toolchain in the image are: -`COMMAND` is the command you want to run. The optional prefix is the Rust toolchain, or version. Allowed values are `nightly`, `stable` or a Rust version. - -Where the optional prefix is not given, the `stable` toolchain will be used. The `stable` version is currently `1.82.0`. +- `nightly` +- stable +- 1.74.1 ## Contents @@ -40,13 +42,3 @@ Where the optional prefix is not given, the `stable` toolchain will be used. The - cargo-chef - cargo-hack - release-plz - -## Binary size - -To reduce the size of the debug binary, add the following to the `.cargo/config.toml` file in you project. - -```toml -[profile.dev] -debug = 0 -strip = "debuginfo" -``` From 70e801e03c2e4ecb1e15d9f9e2b6d65e2596d9d3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 11:18:19 +0000 Subject: [PATCH 21/46] build: handle removing existing images when there are none --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 2ddc177..18041ad 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -13,7 +13,7 @@ jobs: - name: Clear image from cache run: | - docker rmi git.kemitix.net/kemitix/rust:latest + docker images git.kemitix.net/kemitix/rust -q | sort -u | xargs docker rmi docker system prune --force --all - name: Build From 5a5942c4807541fd78f1b76e1e7f2c495dc68fb6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 18:56:43 +0000 Subject: [PATCH 22/46] build: delete images safely and securily - xargs -r -- only run the docker rmi command if there are images to delete - --force -- delete even if used --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 18041ad..760ae58 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -13,7 +13,7 @@ jobs: - name: Clear image from cache run: | - docker images git.kemitix.net/kemitix/rust -q | sort -u | xargs docker rmi + docker images git.kemitix.net/kemitix/rust -q | sort -u | xargs -r docker rmi --force docker system prune --force --all - name: Build From d6ea7a689e17ff1c2bb1603237b27d33a54df402 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 19:01:58 +0000 Subject: [PATCH 23/46] build: use env to get name of repo --- .forgejo/workflows/build-image.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 760ae58..149b3d7 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -13,14 +13,14 @@ jobs: - name: Clear image from cache run: | - docker images git.kemitix.net/kemitix/rust -q | sort -u | xargs -r docker rmi --force + docker images git.kemitix.net/${{ env.GITHUB_REPOSITORY }} -q | sort -u | xargs -r docker rmi --force docker system prune --force --all - name: Build - run: docker build . -t git.kemitix.net/kemitix/rust:latest + run: docker build . -t git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest - name: Login - run: docker login --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }} git.kemitix.net + run: docker login git.kemiti.net --username kemitix --password ${{ env.GITHUB_TOKEN }} - name: Publish - run: docker push git.kemitix.net/kemitix/rust:latest + run: docker push git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest From 1f659c13ab78b8b28b09c7b1bb14c0b7dd5d4367 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 19:15:15 +0000 Subject: [PATCH 24/46] build: fix typo --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 149b3d7..c195831 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -20,7 +20,7 @@ jobs: run: docker build . -t git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest - name: Login - run: docker login git.kemiti.net --username kemitix --password ${{ env.GITHUB_TOKEN }} + run: docker login git.kemitix.net --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }} - name: Publish run: docker push git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest From 1a890522442bfa472c8f865817d8ddc15ce6d82a Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 19:44:00 +0000 Subject: [PATCH 25/46] build: use correct env var for auth --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index c195831..d5c200e 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -20,7 +20,7 @@ jobs: run: docker build . -t git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest - name: Login - run: docker login git.kemitix.net --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }} + run: docker login git.kemitix.net --username kemitix --password ${{ secrets.FORGEJO_TOKEN_WRITE_PACKAGE }} - name: Publish run: docker push git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest From 5d372a60de083347dc9bd7b16b27cb96880d89f6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 13 Jan 2025 08:43:00 +0000 Subject: [PATCH 26/46] build: check for ignored files being included in repo --- .forgejo/workflows/{test.yml => push-next.yml} | 9 +++++++++ 1 file changed, 9 insertions(+) rename .forgejo/workflows/{test.yml => push-next.yml} (75%) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/push-next.yml similarity index 75% rename from .forgejo/workflows/test.yml rename to .forgejo/workflows/push-next.yml index 4a12799..f17055e 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/push-next.yml @@ -18,6 +18,15 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Ignored Files + run: | + IGNORED=$(git ls-files --cached -i --exclude-standard) + if [ -n "$IGNORED" ] + then + echo "Ignored files present:\n$IGNORED" + exit 1 + fi + - name: Machete run: cargo machete From b853a6acec97ae5e29de7917461fa56c24798d3e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 13 Jan 2025 09:04:18 +0000 Subject: [PATCH 27/46] feat: add `check-for-ignored` script Checks for ignored files that have been tracked by git. --- Dockerfile | 2 ++ README.md | 15 +++++++++++++++ scripts/check-for-ignored | 30 ++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100755 scripts/check-for-ignored diff --git a/Dockerfile b/Dockerfile index 23b5fdd..4c4011c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,4 +39,6 @@ RUN rustup install nightly && rustup component add --toolchain nightly rustfmt c RUN git config --global user.email "action@git.kemitix.net" && \ git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" +COPY scripts/ /usr/local/bin/ + WORKDIR /app diff --git a/README.md b/README.md index f3637c6..9e42799 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,18 @@ The available toolchain in the image are: - cargo-chef - cargo-hack - release-plz + +### Scripts + +- `check-for-ignored` + +Checks for files that are being tracked by Git but should be ignored according +to the `.gitignore` file. + +#### Usage + +```yaml +steps: + - name: Check for Ignored Files + run: check-for-ignored +``` diff --git a/scripts/check-for-ignored b/scripts/check-for-ignored new file mode 100755 index 0000000..90f8626 --- /dev/null +++ b/scripts/check-for-ignored @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Exit on error +set -e + +# Check if git is installed +if ! command -v git &> /dev/null; then + echo "Error: git is not installed" + exit 1 +fi + +# Check if we're in a git repository +if ! git rev-parse --is-inside-work-tree &> /dev/null; then + echo "Error: not in a git repository" + exit 1 +fi + +echo "Checking for tracked files that should be ignored..." + +# Find files that are both tracked and ignored +ignored_files=$(git ls-files --cached -i --exclude-standard) + +if [[ -z "$ignored_files" ]]; then + echo "No tracked files are marked as ignored" + exit 0 +else + echo "The following tracked files are marked as ignored:" + echo "$ignored_files" + exit 1 +fi From 3941fe6a1fb3cf34a9f7ab4c4d40ef2996651dc0 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 13 Jan 2025 09:04:18 +0000 Subject: [PATCH 28/46] build: use check-for-ignored --- .forgejo/workflows/push-next.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index f17055e..391d3b7 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -7,7 +7,7 @@ jobs: runs-on: docker container: image: - git.kemitix.net/kemitix/rust:v3.0.0 + git.kemitix.net/kemitix/rust:latest strategy: matrix: toolchain: @@ -19,13 +19,14 @@ jobs: - uses: actions/checkout@v4 - name: Ignored Files - run: | - IGNORED=$(git ls-files --cached -i --exclude-standard) - if [ -n "$IGNORED" ] - then - echo "Ignored files present:\n$IGNORED" - exit 1 - fi + run: check-for-ignored + # run: | + # IGNORED=$(git ls-files --cached -i --exclude-standard) + # if [ -n "$IGNORED" ] + # then + # echo "Ignored files present:\n$IGNORED" + # exit 1 + # fi - name: Machete run: cargo machete From 6d50289a357d511e97a9ebf26d7b3e4926475288 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 07:53:51 +0000 Subject: [PATCH 29/46] build: replace debian base with alpine linux --- Dockerfile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c4011c..7e8529e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,15 @@ -FROM docker.io/rust:1.84.0-slim-bookworm +FROM docker.io/rust:1.84.0-alpine3.21 LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall -# clang-16 & mold - faster linkers for rust -# pkg-config - required to compile some rust `-sys` packages -# libssl-dev - build dependency for git-next -# libdbus-1-dev - linux os interop (e.g. desktop notifications) +# clang & mold - faster linkers for rust +# pkgconfig - required to compile some rust `-sys` packages +# openssl-dev - build dependency for git-next +# dbus-dev - linux os interop (e.g. desktop notifications) # git - git -RUN apt-get update \ - && \ - apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2), libdbus-1-dev (>= 1.14.10), libtag1-dev (>= 1.13), libtagc0-dev (>= 1.13), xorg-dev (>=7.7), libxcb-shape0-dev (>=0.15), libxcb-xfixes0-dev (>=0.15)" \ - && \ - rm -r /var/lib/apt/lists/* +RUN apk add nodejs curl clang pkgconfig mold openssl-dev dbus-dev git RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ From 7ab30ce7c30e20246112d31829b937247a18729d Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 09:06:08 +0000 Subject: [PATCH 30/46] feat: add bash to image --- .forgejo/workflows/push-next.yml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index 391d3b7..6c800c1 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -7,7 +7,7 @@ jobs: runs-on: docker container: image: - git.kemitix.net/kemitix/rust:latest + git.kemitix.net/kemitix/rust:v3.1.0 strategy: matrix: toolchain: diff --git a/Dockerfile b/Dockerfile index 7e8529e..34f2553 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust # openssl-dev - build dependency for git-next # dbus-dev - linux os interop (e.g. desktop notifications) # git - git -RUN apk add nodejs curl clang pkgconfig mold openssl-dev dbus-dev git +RUN apk add nodejs curl clang pkgconfig mold openssl-dev dbus-dev git bash RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ From 9a12ffc5fcf54f5cd1f8cee974d8ce2d85a3e6d8 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:09:30 +0000 Subject: [PATCH 31/46] chore: add build recipe to justfile --- justfile | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..2071a21 --- /dev/null +++ b/justfile @@ -0,0 +1,2 @@ +build: + docker build . -t git.kemitix.net/kemitix/rust:latest From 6aa876047af109889749d3e08369b6ac62cfa750 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:09:30 +0000 Subject: [PATCH 32/46] fix: should build with libssl dependency --- Cargo.toml | 1 + examples/native-tls.rs | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 examples/native-tls.rs diff --git a/Cargo.toml b/Cargo.toml index 7d75412..133dad7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,3 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] +native-tls = "0.2" diff --git a/examples/native-tls.rs b/examples/native-tls.rs new file mode 100644 index 0000000..32acc40 --- /dev/null +++ b/examples/native-tls.rs @@ -0,0 +1,15 @@ +use native_tls::TlsConnector; +use std::io::{Read, Write}; +use std::net::TcpStream; + +fn main() { + let connector = TlsConnector::new().unwrap(); + + let stream = TcpStream::connect("google.com:443").unwrap(); + let mut stream = connector.connect("google.com", stream).unwrap(); + + stream.write_all(b"GET / HTTP/1.0\r\n\r\n").unwrap(); + let mut res = vec![]; + stream.read_to_end(&mut res).unwrap(); + println!("{}", String::from_utf8_lossy(&res)); +} From 2c8b4776d9ea486ff49eeacfca1cb6d7a69c4227 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:09:30 +0000 Subject: [PATCH 33/46] chore: use --no-chache and libssl3 + build-base packages --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 34f2553..80e35d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust # openssl-dev - build dependency for git-next # dbus-dev - linux os interop (e.g. desktop notifications) # git - git -RUN apk add nodejs curl clang pkgconfig mold openssl-dev dbus-dev git bash +RUN apk add --no-cache nodejs curl clang pkgconfig mold libssl3 openssl-dev build-base dbus-dev git bash RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ From 28d34eb85d413d53441423fe26cc1a2f8267600b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 34/46] fix: remove rust 1.74.1 --- .forgejo/workflows/push-next.yml | 1 - Dockerfile | 3 --- 2 files changed, 4 deletions(-) diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index 6c800c1..4a57795 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -13,7 +13,6 @@ jobs: toolchain: - name: stable - name: nightly - - name: 1.74.1 steps: - uses: actions/checkout@v4 diff --git a/Dockerfile b/Dockerfile index 80e35d8..fa25064 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,9 +23,6 @@ RUN cargo binstall -y \ cargo-mutants@25.0 \ release-plz@0.3 -# install v1.74.1 -RUN rustup install 1.74.1 && rustup component add --toolchain 1.74.1 rustfmt clippy - # should be a no-op if the FROM line is up-to-date RUN rustup update stable && rustup component add --toolchain stable rustfmt clippy From 4bd50bdadff89a472c362f115a0078a02c7f4747 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 35/46] build: justfile adds test and shell recipes --- justfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index 2071a21..c1a8fa3 100644 --- a/justfile +++ b/justfile @@ -1,2 +1,10 @@ +image := "git.kemitix.get/kemitix/rust:test" + build: - docker build . -t git.kemitix.net/kemitix/rust:latest + docker build . -t {{ image }} + +test: build + docker run --rm -v $PWD:/app/ {{ image }} cargo test + +shell: build + docker run --rm -it -v $PWD:/app/ {{ image }} bash From e2f2015e062e5e254e92358ec13d237e8d22b9c5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 36/46] test: add regression test for native-tls crate --- Cargo.toml | 2 +- src/main.rs | 10 ++++++++++ examples/native-tls.rs => src/tls.rs | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) rename examples/native-tls.rs => src/tls.rs (96%) diff --git a/Cargo.toml b/Cargo.toml index 133dad7..7fa380b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] -native-tls = "0.2" +native-tls = { version = "0.2", features = ["vendored"] } diff --git a/src/main.rs b/src/main.rs index e7a11a9..f39eee9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,13 @@ +mod tls; fn main() { println!("Hello, world!"); + tls::main(); +} + +#[cfg(test)] +mod tests { + #[test] + fn passes() { + println!("passes okay"); + } } diff --git a/examples/native-tls.rs b/src/tls.rs similarity index 96% rename from examples/native-tls.rs rename to src/tls.rs index 32acc40..f4cb49c 100644 --- a/examples/native-tls.rs +++ b/src/tls.rs @@ -2,7 +2,7 @@ use native_tls::TlsConnector; use std::io::{Read, Write}; use std::net::TcpStream; -fn main() { +pub fn main() { let connector = TlsConnector::new().unwrap(); let stream = TcpStream::connect("google.com:443").unwrap(); From f1a2ae0311fb5c63550685fa398f9135103dd5ac Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 37/46] feat: install most apks later --- Dockerfile | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa25064..126dadf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,15 +2,7 @@ FROM docker.io/rust:1.84.0-alpine3.21 LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust -# nodejs - runtime used by forgejo/github actions -# curl - to download cargo-binstall -# clang & mold - faster linkers for rust -# pkgconfig - required to compile some rust `-sys` packages -# openssl-dev - build dependency for git-next -# dbus-dev - linux os interop (e.g. desktop notifications) -# git - git -RUN apk add --no-cache nodejs curl clang pkgconfig mold libssl3 openssl-dev build-base dbus-dev git bash - +RUN apk add --no-cache curl=8.11.1-r0 RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ rm cargo-binstall.tgz && \ @@ -24,11 +16,37 @@ RUN cargo binstall -y \ release-plz@0.3 # should be a no-op if the FROM line is up-to-date -RUN rustup update stable && rustup component add --toolchain stable rustfmt clippy +RUN rustup update stable + +RUN rustup component add rustfmt clippy # install nightly RUN rustup install nightly && rustup component add --toolchain nightly rustfmt clippy +# nodejs - runtime used by forgejo/github actions +# curl - to download cargo-binstall +# clang & mold - faster linkers for rust +# pkgconfig - required to compile some rust `-sys` packages +# openssl-dev - build dependency for git-next +# dbus-dev - linux os interop (e.g. desktop notifications) +# perl - native-tls(vendored) +# git - git +RUN apk add --no-cache \ + bash \ + nodejs \ + build-base \ + pkgconfig \ + libssl3 \ + openssl-dev \ + perl \ + git + + # clang \ + + # mold \ + + # dbus-dev \ + RUN git config --global user.email "action@git.kemitix.net" && \ git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" From 0c1f4ba125105ac9b91d8253ced4c6bfac099ae0 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 38/46] docs: update readme to include caveat --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 9e42799..6a73835 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ The available toolchain in the image are: - cargo-chef - cargo-hack - release-plz +- perl ### Scripts @@ -57,3 +58,13 @@ steps: - name: Check for Ignored Files run: check-for-ignored ``` + +## Caveats + +### native-tls + +This crate *must* use the `vendored` feature in order to compile in the Alpine Linux image. + +```toml +native-tls = { version = "0.2", features = ["vendored"] } +``` From 97f794a36e7a7630dd36b07b900d47851c895a9e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 39/46] build: add clippy recipe to justfile --- justfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/justfile b/justfile index c1a8fa3..30f08b2 100644 --- a/justfile +++ b/justfile @@ -6,5 +6,8 @@ build: test: build docker run --rm -v $PWD:/app/ {{ image }} cargo test +clippy: build + docker run --rm -v $PWD:/app/ {{ image }} cargo clippy + shell: build docker run --rm -it -v $PWD:/app/ {{ image }} bash From ee426b1a430de8b5ad245f7a2d035cb1400bc5fe Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:52:01 +0000 Subject: [PATCH 40/46] fix: should build with kxio dependency --- Cargo.toml | 2 + justfile | 3 ++ src/kxio.rs | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main.rs | 8 +++- 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 src/kxio.rs diff --git a/Cargo.toml b/Cargo.toml index 7fa380b..41fa947 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,4 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] +kxio = "5.0" native-tls = { version = "0.2", features = ["vendored"] } +tokio = { version = "1.43", features = ["full"] } diff --git a/justfile b/justfile index 30f08b2..b5f2749 100644 --- a/justfile +++ b/justfile @@ -9,5 +9,8 @@ test: build clippy: build docker run --rm -v $PWD:/app/ {{ image }} cargo clippy +run: build + docker run --rm -v $PWD:/app/ {{ image }} cargo run + shell: build docker run --rm -it -v $PWD:/app/ {{ image }} bash diff --git a/src/kxio.rs b/src/kxio.rs new file mode 100644 index 0000000..1d56825 --- /dev/null +++ b/src/kxio.rs @@ -0,0 +1,105 @@ +/// This is an example to show fetching a file from a webiste and saving to a file +/// +/// The example consts of: +/// +/// - The main program, in `main()` - demonstrates how to setup `kxio` for use in prod +/// - A test module - demonstrates how to use `kxio` in tests +/// - sample functions - showing how to use `kxio` the body of your program, and be testable +/// +/// NOTE: running this program with `cargo run --example get` will create and delete the file +/// `example-readme.md` in the current directory. +use std::path::Path; + +use kxio::fs::FileHandle; + +// #[tokio::main] +pub async fn main() -> kxio::Result<()> { + // Create a `Net` object for making real network requests. + let net: kxio::net::Net = kxio::net::new(); + + // Create a `FileSystem` object for accessing files within the current directory. + // The object created will return a `PathTraveral` error result if there is an attempt to\ + // access a file outside of this directory. + let current_dir = std::env::current_dir().map_err(kxio::fs::Error::Io)?; + let fs: kxio::fs::FileSystem = kxio::fs::new(current_dir); + + // The URL we will fetch - the readme for this library. + let url = "https://git.kemitix.net/kemitix/kxio/raw/branch/main/README.md"; + + // Create a PathBuf to a file within the directory that the `fs` object has access to. + let file_path = fs.base().join("example-readme.md"); + + // Create a generic handle for the file. This doesn't open the file, and always succeeds. + let path = fs.path(&file_path); + + // Other options are; + // `fs.file(&file_path)` - for a file + // `fs.dir(&dir_path)` - for a directory + + // Checks if the path exists (whether a file, directory, etc) + if path.exists()? { + eprintln!("The file {path} already exists. Aborting!"); + return Ok(()); + } + + // Passes a reference to the `fs` and `net` objects for use by your program. + // Your programs should not know whether they are handling a mock or the real thing. + // Any file or network access should be made using these handlers to be properly testable. + let file = download_and_save_to_file(url, &file_path, &fs, &net).await?; + read_file(&file)?; + delete_file(file)?; + + Ok(()) +} + +/// An function that uses a `FileSystem` and a `Net` object to interact with the outside world. +async fn download_and_save_to_file( + url: &str, + file_path: &Path, + // The filesystem abstraction + fs: &kxio::fs::FileSystem, + // The network abstraction + net: &kxio::net::Net, +) -> kxio::Result { + println!("fetching: {url}"); + + // Makes a GET request that can be mocked in a test + let response = net.get(url).header("key", "value").send().await?; + + // As you can see, we use [reqwest] under the hood. + // + // If you need to create a more complex request than the [kxio] fluent API allows, you + // can create a request using [reqwest] and pass it to [net.send(request)]. + + let body = response.text().await?; + println!("fetched {} bytes", body.bytes().len()); + + // Uses the file system abstraction to create a handle for a file. + let file: kxio::fs::PathReal = fs.file(file_path); + println!("writing file: {file}"); + // Writes the body to the file. + file.write(body)?; + + Ok(file) +} + +/// A function that reads the file contents +fn read_file(file: &FileHandle) -> kxio::Result<()> { + println!("reading file: {file}"); + + // Creates a `Reader` which loaded the file into memory. + let reader: kxio::fs::Reader = file.reader()?; + let contents: &str = reader.as_str()?; + println!("{contents}"); + + Ok(()) +} + +/// A function that deletes the file +fn delete_file(file: FileHandle) -> kxio::Result<()> { + println!("deleting file: {file}"); + + file.remove()?; + + Ok(()) +} diff --git a/src/main.rs b/src/main.rs index f39eee9..341c44b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,13 @@ +// +mod kxio; mod tls; -fn main() { + +fn main() -> Result<(), Box> { println!("Hello, world!"); tls::main(); + + let rt = tokio::runtime::Runtime::new()?; + Ok(rt.block_on(crate::kxio::main())?) } #[cfg(test)] From 2a9c2cef76a0dd8d736378e512d8034e21892745 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 Jan 2025 08:25:16 +0000 Subject: [PATCH 41/46] fix: add cargo components to toolchain stable-x86_64-unknown-linux-musl --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 126dadf..e301952 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN cargo binstall -y \ # should be a no-op if the FROM line is up-to-date RUN rustup update stable -RUN rustup component add rustfmt clippy +RUN rustup component add --toolchain stable-x86_64-unknown-linux-musl rustfmt clippy # install nightly RUN rustup install nightly && rustup component add --toolchain nightly rustfmt clippy From 05d4233d3f83337406f89eff238a2544456a2ef5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 Jan 2025 08:25:16 +0000 Subject: [PATCH 42/46] build: add fmt recipe to justfile --- justfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/justfile b/justfile index b5f2749..223b3a8 100644 --- a/justfile +++ b/justfile @@ -12,5 +12,8 @@ clippy: build run: build docker run --rm -v $PWD:/app/ {{ image }} cargo run +fmt: build + docker run --rm -v $PWD:/app/ {{ image }} cargo fmt + shell: build docker run --rm -it -v $PWD:/app/ {{ image }} bash From 26c46227e665358328eeafbee01b7bc3e68cde4c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 43/46] feat: push-next uses 'latest' image --- .forgejo/workflows/push-next.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index 4a57795..3de00fb 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -7,7 +7,7 @@ jobs: runs-on: docker container: image: - git.kemitix.net/kemitix/rust:v3.1.0 + git.kemitix.net/kemitix/rust:latest strategy: matrix: toolchain: From 3f87d011e73e92b48db0f0fe7bfecc33c67c3fda Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 18 Jan 2025 20:19:49 +0000 Subject: [PATCH 44/46] feat: add dbus-dev to image --- Dockerfile | 1 + README.md | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e301952..f638a27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,7 @@ RUN apk add --no-cache \ libssl3 \ openssl-dev \ perl \ + dbus-dev \ git # clang \ diff --git a/README.md b/README.md index 6a73835..cf908c1 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ The available toolchain in the image are: - cargo-chef - cargo-hack - release-plz +- dbus-dev - perl ### Scripts @@ -61,10 +62,33 @@ steps: ## Caveats -### native-tls +### openssl + +The alpine linux install doesn't build with this dependency. You can either compile `native-tls` with the `vendored` feature, or not use `openssl`. + +#### vendoered native-tls This crate *must* use the `vendored` feature in order to compile in the Alpine Linux image. ```toml native-tls = { version = "0.2", features = ["vendored"] } ``` + +#### Don't use `openssl` + +Check that none of your dependencies require `openssl`: + +```bash +cargo tree --edges normal -i openssl +``` + +This will list the tree of dependencies that are bringing in `openssl`. + +If you do need ssl/tls, try using `rustls`. e.g. + +```toml +reqwest = { version = "0.12", default-features = false, features = [ + "json", + "rustls-tls", +] } +``` From db523065e02d00d16d800e41b36f0b5279c2da39 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 18 Jan 2025 20:52:20 +0000 Subject: [PATCH 45/46] feat: remove openssl transitive dependency --- Cargo.toml | 3 +-- justfile | 2 +- src/main.rs | 2 -- src/tls.rs | 15 --------------- 4 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 src/tls.rs diff --git a/Cargo.toml b/Cargo.toml index 41fa947..4b31261 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,5 @@ version = "0.1.0" edition = "2021" [dependencies] -kxio = "5.0" -native-tls = { version = "0.2", features = ["vendored"] } +kxio = "5.1" tokio = { version = "1.43", features = ["full"] } diff --git a/justfile b/justfile index 223b3a8..60bdbb1 100644 --- a/justfile +++ b/justfile @@ -1,4 +1,4 @@ -image := "git.kemitix.get/kemitix/rust:test" +image := "git.kemitix.net/kemitix/rust:test" build: docker build . -t {{ image }} diff --git a/src/main.rs b/src/main.rs index 341c44b..93488b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,8 @@ // mod kxio; -mod tls; fn main() -> Result<(), Box> { println!("Hello, world!"); - tls::main(); let rt = tokio::runtime::Runtime::new()?; Ok(rt.block_on(crate::kxio::main())?) diff --git a/src/tls.rs b/src/tls.rs deleted file mode 100644 index f4cb49c..0000000 --- a/src/tls.rs +++ /dev/null @@ -1,15 +0,0 @@ -use native_tls::TlsConnector; -use std::io::{Read, Write}; -use std::net::TcpStream; - -pub fn main() { - let connector = TlsConnector::new().unwrap(); - - let stream = TcpStream::connect("google.com:443").unwrap(); - let mut stream = connector.connect("google.com", stream).unwrap(); - - stream.write_all(b"GET / HTTP/1.0\r\n\r\n").unwrap(); - let mut res = vec![]; - stream.read_to_end(&mut res).unwrap(); - println!("{}", String::from_utf8_lossy(&res)); -} From e06202941f4f089d02b7dc5850f1106dba6819bd Mon Sep 17 00:00:00 2001 From: silvana Date: Mon, 20 Jan 2025 08:14:40 +0100 Subject: [PATCH 46/46] fix(rename): modify to use my forgejo instance. --- .forgejo/workflows/build-image.yml | 44 +++++++++++++++++++++--------- .forgejo/workflows/push-next.yml | 3 +- Dockerfile | 6 ++-- justfile | 2 +- 4 files changed, 36 insertions(+), 19 deletions(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index d5c200e..3794bd8 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -5,22 +5,40 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: docker + container: + image: ubuntu:latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Clear image from cache - run: | - docker images git.kemitix.net/${{ env.GITHUB_REPOSITORY }} -q | sort -u | xargs -r docker rmi --force - docker system prune --force --all + - name: login to docker registry + uses: docker/login-action@v3 + with: + registry: git.ragarock.moe + username: silvana + password: ${{ secrets.REGISTRY_TOKEN }} - - name: Build - run: docker build . -t git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest + - name: setup buildx + uses: docker/setup-buildx-action@v3 - - name: Login - run: docker login git.kemitix.net --username kemitix --password ${{ secrets.FORGEJO_TOKEN_WRITE_PACKAGE }} + - name: build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: git.ragarock.moe/${{ env.GITHUB_REPOSITORY }}:latest - - name: Publish - run: docker push git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest + # - name: Clear image from cache + # run: | + # docker images git.ragarock.moe/${{ env.GITHUB_REPOSITORY }} -q | sort -u | xargs -r docker rmi --force + # docker system prune --force --all + + # - name: Build + # run: docker build . -t git.ragarock.moe/${{ env.GITHUB_REPOSITORY }}:latest + + # - name: Login + # run: docker login git.ragarock.moe --username silvana --password ${{ secrets.FORGEJO_TOKEN_WRITE_PACKAGE }} + + # - name: Publish + # run: docker push git.ragarock.moe/${{ env.GITHUB_REPOSITORY }}:latest diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index 3de00fb..8aca99b 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -6,8 +6,7 @@ jobs: test: runs-on: docker container: - image: - git.kemitix.net/kemitix/rust:latest + image: git.ragarock.moe/silvana/rust:latest strategy: matrix: toolchain: diff --git a/Dockerfile b/Dockerfile index f638a27..15fbcaf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/rust:1.84.0-alpine3.21 -LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust +LABEL org.opencontainers.image.source=https://git.ragarock.moe/silvana/rust RUN apk add --no-cache curl=8.11.1-r0 RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ @@ -48,8 +48,8 @@ RUN apk add --no-cache \ # dbus-dev \ -RUN git config --global user.email "action@git.kemitix.net" && \ - git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" +RUN git config --global user.email "holo@ragarock.moe" && \ + git config --global user.name "ForgeJo Action. See: https://git.ragarock.moe/silvana/rust" COPY scripts/ /usr/local/bin/ diff --git a/justfile b/justfile index 60bdbb1..373ea93 100644 --- a/justfile +++ b/justfile @@ -1,4 +1,4 @@ -image := "git.kemitix.net/kemitix/rust:test" +image := "git.ragarock.moe/silvana/rust:test" build: docker build . -t {{ image }}