diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee26ac3f..655dac15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,6 +102,7 @@ jobs: build-args: | REPO_OWNER=${{ steps.meta.outputs.repo_owner }} REPO_NAME=${{ steps.meta.outputs.repo_name }} + BASE_TAG=base 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 b7c27149..a6491432 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,3 @@ -# Define base image build arguments (must be before any FROM) -ARG REPO_OWNER=dispatcharr -ARG REPO_NAME=dispatcharr -ARG BASE_TAG=base - # --- Build frontend --- FROM node:20 AS frontend-builder WORKDIR /app/frontend @@ -11,6 +6,11 @@ RUN corepack enable && corepack prepare yarn@stable --activate && \ yarn install && yarn build && \ rm -rf node_modules .cache +# --- Redeclare build arguments for the next stage --- +ARG REPO_OWNER +ARG REPO_NAME +ARG BASE_TAG + # --- Final image based on the dynamic base --- FROM ghcr.io/${REPO_OWNER}/${REPO_NAME}:${BASE_TAG} AS final ENV VIRTUAL_ENV=/dispatcharrpy