Added support for Forks.

This commit is contained in:
SergeantPanda 2025-03-24 09:46:08 -05:00
parent 3154d9e5e0
commit 2d593dc64e
2 changed files with 6 additions and 2 deletions

View file

@ -50,6 +50,7 @@ jobs:
platforms: linux/amd64,linux/arm64
build-args: |
BRANCH=${{ env.BRANCH }}
REPO_URL=https://github.com/${{ github.repository }}
tags: |
ghcr.io/${{ env.REPO_NAME }}:${{ env.TAG }}
ghcr.io/${{ env.REPO_NAME }}:${{ github.sha }}

View file

@ -1,7 +1,10 @@
FROM python:3.13-slim AS builder
# Define build argument with default value of "main"
# Define build arguments with default values
ARG BRANCH=main
# This will be overridden by the GitHub Actions workflow
# when building the Docker image for production.
ARG REPO_URL=https://github.com/Dispatcharr/Dispatcharr
ENV PATH="/dispatcharrpy/bin:$PATH" \
VIRTUAL_ENV=/dispatcharrpy \
@ -27,7 +30,7 @@ RUN apt-get update && \
nodejs && \
python -m pip install virtualenv && \
virtualenv /dispatcharrpy && \
git clone -b ${BRANCH} https://github.com/Dispatcharr/Dispatcharr /app && \
git clone -b ${BRANCH} ${REPO_URL} /app && \
cd /app && \
rm -rf .git && \
cd /app && \