From 60a8bed65a309af63f0807e07ffa86a9e227d46b Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Fri, 9 May 2025 08:16:43 -0500 Subject: [PATCH] Properly pass build arguments. --- .github/workflows/ci.yml | 1 + docker/Dockerfile | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) 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