chore: update docker-publish.yaml and Dockerfile

This commit is contained in:
xboard
2025-05-16 22:43:00 +08:00
parent e49f88d311
commit 0d1588f58a
2 changed files with 14 additions and 7 deletions
+3
View File
@@ -90,6 +90,9 @@ jobs:
build-args: | build-args: |
BUILDKIT_INLINE_CACHE=1 BUILDKIT_INLINE_CACHE=1
BUILDKIT_MULTI_PLATFORM=1 BUILDKIT_MULTI_PLATFORM=1
CACHEBUST=${{ github.sha }}
REPO_URL=https://github.com/${{ github.repository }}
BRANCH_NAME=${{ github.ref_name }}
provenance: false provenance: false
outputs: type=registry,push=true outputs: type=registry,push=true
allow: | allow: |
+10 -6
View File
@@ -16,12 +16,16 @@ WORKDIR /www
COPY .docker / COPY .docker /
# Add build argument for cache busting # Add build arguments
ARG CACHEBUST=1 ARG CACHEBUST
ARG REPO_URL=https://github.com/cedar2025/Xboard ARG REPO_URL
RUN git config --global --add safe.directory /www && \ ARG BRANCH_NAME
echo "Cache bust: ${CACHEBUST}" && \
git clone --depth 1 ${REPO_URL} . RUN echo "Attempting to clone branch: ${BRANCH_NAME} from ${REPO_URL} with CACHEBUST: ${CACHEBUST}" && \
rm -rf ./* && \
rm -rf .git && \
git config --global --add safe.directory /www && \
git clone --depth 1 --branch ${BRANCH_NAME} ${REPO_URL} .
COPY .docker/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY .docker/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf