From 1ff748d3d1563e19cb2d5862d9781cbea3b51b75 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Thu, 8 May 2025 17:10:27 -0500 Subject: [PATCH] Dynamically build base image repo. --- .github/workflows/ci.yml | 2 ++ docker/Dockerfile | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1418cbf5..ee26ac3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,6 +100,8 @@ jobs: ghcr.io/${{ steps.meta.outputs.repo_owner }}/${{ steps.meta.outputs.repo_name }}:${{ steps.version.outputs.version }}-${{ steps.timestamp.outputs.timestamp }} ghcr.io/${{ steps.meta.outputs.repo_owner }}/${{ steps.meta.outputs.repo_name }}:${{ steps.version.outputs.sha_short }} build-args: | + REPO_OWNER=${{ steps.meta.outputs.repo_owner }} + REPO_NAME=${{ steps.meta.outputs.repo_name }} BRANCH=${{ github.ref_name }} REPO_URL=https://github.com/${{ github.repository }} TIMESTAMP=${{ steps.timestamp.outputs.timestamp }} diff --git a/docker/Dockerfile b/docker/Dockerfile index 38ed5c25..ab7ea685 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,8 +6,13 @@ RUN corepack enable && corepack prepare yarn@stable --activate && \ yarn install && yarn build && \ rm -rf node_modules .cache -# --- Final image based on the base --- -FROM sergeantpanda/dispatcharr:base AS final +# --- Define base image build arguments --- +ARG REPO_OWNER=dispatcharr +ARG REPO_NAME=dispatcharr +ARG BASE_TAG=base + +# --- Final image based on the dynamic base --- +FROM ghcr.io/${REPO_OWNER}/${REPO_NAME}:${BASE_TAG} AS final ENV VIRTUAL_ENV=/dispatcharrpy ENV PATH="$VIRTUAL_ENV/bin:$PATH" WORKDIR /app