From 2d2db087fc1b6fe0060db8d6e3d72ee8e696771d Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 11:40:26 -0500 Subject: [PATCH 01/18] dockerfile --- .github/workflows/ci.yml | 19 ++++++++++++++++++- Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41866f17..0c60748b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,24 @@ jobs: with: command: fmt args: --all -- --check - + image: + name: Build docker image + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install docker + uses: docker/setup-buildx-action@v2 + - name: 'Auth to GitHub Container Registry' + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + - name: Build and push image + run: | + docker buildx build --platform linux/amd64,linux/arm64 --push -t privaxy/privaxy:latest . + docker push ghcr.io/joshrmcdaniel/privaxy:latest ci: name: Build runs-on: ${{ matrix.os }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..aa22f2e8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +# syntax=docker/dockerfile:1 + +ARG PRIVAXY_BASE_PATH="/conf" + +# Build stage +FROM rust:1.86.0 AS builder +WORKDIR /app +COPY . . +ARG PRIVAXY_BASE_PATH +RUN rustup target add wasm32-unknown-unknown \ + && apt-get update && apt-get install -y \ + pkg-config \ + build-essential \ + cmake \ + clang \ + libssl-dev \ + nodejs \ + npm \ + git \ + && rm -rf /var/lib/apt/lists/* \ + && curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash \ + && cargo binstall trunk \ + && cd web_frontend \ + && npm i && trunk build --release \ + && cd .. && cargo build --release \ + && mkdir -p "${PRIVAXY_BASE_PATH}" + +FROM gcr.io/distroless/cc-debian12:latest +ARG PRIVAXY_BASE_PATH +COPY --from=builder /app/target/release/privaxy /app/privaxy +COPY --from=builder "${PRIVAXY_BASE_PATH}" "${PRIVAXY_BASE_PATH}" +ENV PRIVAXY_BASE_PATH="${PRIVAXY_BASE_PATH}" +VOLUME [ "${PRIVAXY_BASE_PATH}" ] + +EXPOSE 8100 8200 +WORKDIR /app +ENTRYPOINT ["/app/privaxy"] \ No newline at end of file From 4f0e71e3c4882e32794f04d6eb4d1dce86b17987 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 15:10:00 -0500 Subject: [PATCH 02/18] typo --- Dockerfile | 8 +++----- privaxy/src/resources/error.html | 2 +- privaxy/src/server/proxy/serve.rs | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa22f2e8..2103b36a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG PRIVAXY_BASE_PATH="/conf" # Build stage -FROM rust:1.86.0 AS builder +FROM rust:1 AS builder WORKDIR /app COPY . . ARG PRIVAXY_BASE_PATH @@ -22,13 +22,11 @@ RUN rustup target add wasm32-unknown-unknown \ && cargo binstall trunk \ && cd web_frontend \ && npm i && trunk build --release \ - && cd .. && cargo build --release \ - && mkdir -p "${PRIVAXY_BASE_PATH}" + && cd .. && cargo build --release -FROM gcr.io/distroless/cc-debian12:latest +FROM gcr.io/distroless/cc-debian12:nonroot ARG PRIVAXY_BASE_PATH COPY --from=builder /app/target/release/privaxy /app/privaxy -COPY --from=builder "${PRIVAXY_BASE_PATH}" "${PRIVAXY_BASE_PATH}" ENV PRIVAXY_BASE_PATH="${PRIVAXY_BASE_PATH}" VOLUME [ "${PRIVAXY_BASE_PATH}" ] diff --git a/privaxy/src/resources/error.html b/privaxy/src/resources/error.html index 98942818..e9201ebe 100644 --- a/privaxy/src/resources/error.html +++ b/privaxy/src/resources/error.html @@ -11,7 +11,7 @@

Bad

Reason: -

#{request_error_reson}#
+
#{request_error_reason}#

diff --git a/privaxy/src/server/proxy/serve.rs b/privaxy/src/server/proxy/serve.rs index 8e4f5a1b..e5df75f3 100644 --- a/privaxy/src/server/proxy/serve.rs +++ b/privaxy/src/server/proxy/serve.rs @@ -155,7 +155,7 @@ pub(crate) async fn serve( fn get_informative_error_response(reason: &str) -> Response { let mut response_body = String::from(include_str!("../../resources/head.html")); response_body += - &include_str!("../../resources/error.html").replace("#{request_error_reson}#", reason); + &include_str!("../../resources/error.html").replace("#{request_error_reason}#", reason); let mut response = Response::new(Body::from(response_body)); *response.status_mut() = http::StatusCode::BAD_GATEWAY; From c45ed9db90a2b541e5a96811f4c3006755c1748d Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 15:16:17 -0500 Subject: [PATCH 03/18] ci --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c60748b..1afaaff3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,12 @@ name: CI # See https://help.github.com/en/actions/reference/events-that-trigger-workflows -on: [push, pull_request] +on: + branch: + - main + pull_request: + types: [opened, synchronize, reopened] + branches: + - main jobs: clippy_check: name: Run clippy check From aea7c6bddfca03576db0281c660687bb373796a3 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 15:25:39 -0500 Subject: [PATCH 04/18] ci --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1afaaff3..1caa3bbf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,10 @@ name: CI # See https://help.github.com/en/actions/reference/events-that-trigger-workflows -on: - branch: - - main +on: + push: + branches: + - main pull_request: - types: [opened, synchronize, reopened] branches: - main jobs: From c8d6a5ad4287afa43541f6071eeae85d8735f82b Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 15:54:41 -0500 Subject: [PATCH 05/18] fmt --- privaxy/src/server/configuration/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/privaxy/src/server/configuration/mod.rs b/privaxy/src/server/configuration/mod.rs index 8da4d785..6119f44b 100644 --- a/privaxy/src/server/configuration/mod.rs +++ b/privaxy/src/server/configuration/mod.rs @@ -270,12 +270,9 @@ impl Configuration { } pub(crate) fn get_config_file() -> PathBuf { - get_base_directory() - .unwrap() - .join(CONFIGURATION_FILE_NAME) + get_base_directory().unwrap().join(CONFIGURATION_FILE_NAME) } - fn get_base_directory() -> ConfigurationResult { let base_directory: PathBuf = match env::var("PRIVAXY_BASE_PATH") { Ok(val) => PathBuf::from(&val), From e6d332ab7d0ad7cfe8ad5889fa7783520aeded51 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 15:56:08 -0500 Subject: [PATCH 06/18] ci --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1caa3bbf..a55bb8f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,16 +20,11 @@ jobs: toolchain: nightly components: clippy override: true - - - name: Install gui library packages - run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential libayatana-appindicator3-dev librsvg2-dev libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev - - name: Install trunk uses: actions-rs/cargo@v1 with: command: install args: --locked --debug trunk - - name: Install webassembly rust target run: rustup target add wasm32-unknown-unknown From 7c292cfb06772d805463c285c7735d141d766ba8 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 15:58:25 -0500 Subject: [PATCH 07/18] ci --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a55bb8f9..d67524d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,11 +146,11 @@ jobs: args: --release --target ${{ matrix.target }} --bin privaxy --target-dir target - name: Build deb run: cargo install cargo-deb && cargo deb -p privaxy --target ${{ matrix.target }} -o target/${{ matrix.target }}/release - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: privaxy-deb-${{ matrix.target }} path: target/${{ matrix.target }}/release/privaxy_*.deb - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: privaxy-${{ matrix.target }} path: | From 96fa2e96b385bc4f995f48e4abf388a59ff4b9c1 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 16:09:46 -0500 Subject: [PATCH 08/18] multiarch --- .github/workflows/ci.yml | 17 ++++++++++++++++- Dockerfile | 27 ++++++++++++++++++++------- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d67524d1..d5a6393e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,18 @@ jobs: args: --all -- --check image: name: Build docker image - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - build: linux + os: ubuntu-latest + rust: stable + target: x86_64-unknown-linux-gnu + - build: linux + os: ubuntu-24.04-arm + rust: stable + target: aarch64-unknown-linux-gnu steps: - name: Checkout uses: actions/checkout@v2 @@ -99,6 +110,10 @@ jobs: os: ubuntu-latest rust: stable target: aarch64-unknown-linux-gnu + - build: linux + os: ubuntu-24.04-arm + rust: stable + target: aarch64-unknown-linux-gnu steps: - name: Checkout uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index 2103b36a..f5bcba82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,29 +2,42 @@ ARG PRIVAXY_BASE_PATH="/conf" +FROM ${BUILDARCH}/node:lts-slim AS node +WORKDIR /app +COPY . . +RUN cd web_frontend \ + && npm i \ + && npx tailwindcss build -i src/tailwind.css -o dist/.stage/tailwind.css + + # Build stage -FROM rust:1 AS builder +FROM ${BUILDARCH}/rust:1 AS builder WORKDIR /app COPY . . -ARG PRIVAXY_BASE_PATH +COPY --from=node /app/web_frontend/dist/ /app/web_frontend/dist/ +COPY --from=node /app/web_frontend/node_modules/ /app/web_frontend/node_modules/ +COPY --from=node /app/web_frontend/dist/.stage/tailwind.css /app/web_frontend/dist/.stage/tailwind.css +COPY < Date: Sun, 27 Apr 2025 16:17:58 -0500 Subject: [PATCH 09/18] multiarch --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5a6393e..a012a6fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,6 @@ jobs: run: cargo build working-directory: . - rustfmt: name: Check style runs-on: ubuntu-latest @@ -94,8 +93,7 @@ jobs: password: ${{secrets.GITHUB_TOKEN}} - name: Build and push image run: | - docker buildx build --platform linux/amd64,linux/arm64 --push -t privaxy/privaxy:latest . - docker push ghcr.io/joshrmcdaniel/privaxy:latest + docker build --push -t ghcr.io/joshrmcdaniel/privaxy:latest . ci: name: Build runs-on: ${{ matrix.os }} From 801141685cf8df888a7b867fe11b324b5245aed3 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 16:20:40 -0500 Subject: [PATCH 10/18] multiarch --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f5bcba82..c91ae260 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG PRIVAXY_BASE_PATH="/conf" -FROM ${BUILDARCH}/node:lts-slim AS node +FROM node:lts-slim AS node WORKDIR /app COPY . . RUN cd web_frontend \ @@ -11,7 +11,7 @@ RUN cd web_frontend \ # Build stage -FROM ${BUILDARCH}/rust:1 AS builder +FROM rust:1 AS builder WORKDIR /app COPY . . COPY --from=node /app/web_frontend/dist/ /app/web_frontend/dist/ From 30166cf26557bec7e5baab7fe22883f21b4ebe75 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 16:23:09 -0500 Subject: [PATCH 11/18] multiarch --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c91ae260..435ec1cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,6 @@ RUN cd web_frontend \ && npx tailwindcss build -i src/tailwind.css -o dist/.stage/tailwind.css -# Build stage FROM rust:1 AS builder WORKDIR /app COPY . . From a8757746688f18119513e923fffc6e9b77a9c623 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 16:50:44 -0500 Subject: [PATCH 12/18] dockerfile --- Dockerfile | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 435ec1cf..dd3bf6a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,37 +2,24 @@ ARG PRIVAXY_BASE_PATH="/conf" -FROM node:lts-slim AS node -WORKDIR /app -COPY . . -RUN cd web_frontend \ - && npm i \ - && npx tailwindcss build -i src/tailwind.css -o dist/.stage/tailwind.css - - FROM rust:1 AS builder WORKDIR /app -COPY . . -COPY --from=node /app/web_frontend/dist/ /app/web_frontend/dist/ -COPY --from=node /app/web_frontend/node_modules/ /app/web_frontend/node_modules/ -COPY --from=node /app/web_frontend/dist/.stage/tailwind.css /app/web_frontend/dist/.stage/tailwind.css -COPY < Date: Sun, 27 Apr 2025 16:53:21 -0500 Subject: [PATCH 13/18] ci --- .github/workflows/ci.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a012a6fc..480c0858 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,18 +68,7 @@ jobs: args: --all -- --check image: name: Build docker image - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - build: linux - os: ubuntu-latest - rust: stable - target: x86_64-unknown-linux-gnu - - build: linux - os: ubuntu-24.04-arm - rust: stable - target: aarch64-unknown-linux-gnu + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 @@ -93,7 +82,7 @@ jobs: password: ${{secrets.GITHUB_TOKEN}} - name: Build and push image run: | - docker build --push -t ghcr.io/joshrmcdaniel/privaxy:latest . + docker buildx build --platform linux/arm64/v8,linux/amd64 --push -t ghcr.io/joshrmcdaniel/privaxy:latest . ci: name: Build runs-on: ${{ matrix.os }} From 1e5d46ce9444c30ab796db98d4cd557b34d09db2 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 16:55:58 -0500 Subject: [PATCH 14/18] docker --- Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index dd3bf6a2..b5179f56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ ARG PRIVAXY_BASE_PATH="/conf" FROM rust:1 AS builder WORKDIR /app + RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash \ & rustup target add wasm32-unknown-unknown \ && cargo binstall trunk @@ -17,18 +18,27 @@ RUN apt-get update && apt-get install -qy \ RUN curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh \ && bash nodesource_setup.sh \ && apt-get install -qy nodejs + COPY . . + RUN cd web_frontend \ && npm i \ && trunk build --release \ && cd .. && cargo build --release FROM gcr.io/distroless/cc-debian12:nonroot-${BUILDARCH} -ARG PRIVAXY_BASE_PATH + COPY --from=builder /app/target/release/privaxy /app/privaxy + +ARG PRIVAXY_BASE_PATH="/conf" ENV PRIVAXY_BASE_PATH="${PRIVAXY_BASE_PATH}" +# todo: add support for reading proxy vars +ARG PRIVAXY_PROXY_PORT=8100 +ARG PRIVAXY_WEB_PORT=8200 + VOLUME [ "${PRIVAXY_BASE_PATH}" ] -EXPOSE 8100 8200 + +EXPOSE ${PRIVAXY_PROXY_PORT} ${PRIVAXY_WEB_PORT} WORKDIR /app ENTRYPOINT ["/app/privaxy"] \ No newline at end of file From 0c7080d7cb7fe8fdd6097e1f85412563c138459a Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Sun, 27 Apr 2025 17:07:19 -0500 Subject: [PATCH 15/18] env vars --- .github/workflows/ci.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 480c0858..81dff5bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,11 +69,24 @@ jobs: image: name: Build docker image runs-on: ubuntu-latest + steps: - name: Checkout uses: actions/checkout@v2 - name: Install docker uses: docker/setup-buildx-action@v2 + - name: Get image tag + id: vars + run: | + rel="$( echo "${GITHUB_REF#refs/*/}" )" + if grep -qE '^\d+\.\d+\.\d+' <<< "$rel" ; then + echo "IMAGE_TAG=$rel" >> $GITHUB_ENV + elif [ "$rel" = "main" ]; then + echo "IMAGE_TAG=dev" >> $GITHUB_ENV + else + rel=$(echo "$GITHUB_SHA" | cut -c1-7) + echo "IMAGE_TAG=$rel" >> $GITHUB_ENV + fi - name: 'Auth to GitHub Container Registry' uses: docker/login-action@v1 with: @@ -81,8 +94,11 @@ jobs: username: ${{github.actor}} password: ${{secrets.GITHUB_TOKEN}} - name: Build and push image - run: | - docker buildx build --platform linux/arm64/v8,linux/amd64 --push -t ghcr.io/joshrmcdaniel/privaxy:latest . + env: + IMAGE_TAG: ${{ env.IMAGE_TAG }} + run: >- + docker buildx build --platform linux/arm64/v8,linux/amd64 + --push -t "ghcr.io/joshrmcdaniel/privaxy:${IMAGE_TAG}" . ci: name: Build runs-on: ${{ matrix.os }} @@ -93,10 +109,6 @@ jobs: os: ubuntu-latest rust: stable target: x86_64-unknown-linux-gnu - - build: linux - os: ubuntu-latest - rust: stable - target: aarch64-unknown-linux-gnu - build: linux os: ubuntu-24.04-arm rust: stable From 239ec30ef959c17b2c9f9209d09de6ea0d05543a Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:09:49 -0500 Subject: [PATCH 16/18] rm archtag --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b5179f56..4b7eabe1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN cd web_frontend \ && trunk build --release \ && cd .. && cargo build --release -FROM gcr.io/distroless/cc-debian12:nonroot-${BUILDARCH} +FROM gcr.io/distroless/cc-debian12:nonroot COPY --from=builder /app/target/release/privaxy /app/privaxy From 7681c0308f57fb4a4876f4891293f42a5039e062 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:11:21 -0500 Subject: [PATCH 17/18] echo img tag --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81dff5bc..e3a73b7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,6 +87,7 @@ jobs: rel=$(echo "$GITHUB_SHA" | cut -c1-7) echo "IMAGE_TAG=$rel" >> $GITHUB_ENV fi + echo "Image tag: ${IMAGE_TAG}" - name: 'Auth to GitHub Container Registry' uses: docker/login-action@v1 with: From 6593986a7c53ae5b342bdef7ea77cde3e36cd4a0 Mon Sep 17 00:00:00 2001 From: joshrmcdaniel <80354972+joshrmcdaniel@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:13:07 -0500 Subject: [PATCH 18/18] echo img tag --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3a73b7c..b1c2f6e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,14 +80,16 @@ jobs: run: | rel="$( echo "${GITHUB_REF#refs/*/}" )" if grep -qE '^\d+\.\d+\.\d+' <<< "$rel" ; then + echo "Using $rel as image tag" echo "IMAGE_TAG=$rel" >> $GITHUB_ENV elif [ "$rel" = "main" ]; then + echo "Using dev as image tag" echo "IMAGE_TAG=dev" >> $GITHUB_ENV else rel=$(echo "$GITHUB_SHA" | cut -c1-7) + echo "Using $rel as image tag" echo "IMAGE_TAG=$rel" >> $GITHUB_ENV fi - echo "Image tag: ${IMAGE_TAG}" - name: 'Auth to GitHub Container Registry' uses: docker/login-action@v1 with: