Dynamically build base image repo.

This commit is contained in:
SergeantPanda 2025-05-08 17:10:27 -05:00
parent f34cf9e086
commit 1ff748d3d1
2 changed files with 9 additions and 2 deletions

View file

@ -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 }}

View file

@ -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