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

View File

@@ -89,7 +89,10 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
build-args: |
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
outputs: type=registry,push=true
allow: |

View File

@@ -16,12 +16,16 @@ WORKDIR /www
COPY .docker /
# Add build argument for cache busting
ARG CACHEBUST=1
ARG REPO_URL=https://github.com/cedar2025/Xboard
RUN git config --global --add safe.directory /www && \
echo "Cache bust: ${CACHEBUST}" && \
git clone --depth 1 ${REPO_URL} .
# Add build arguments
ARG CACHEBUST
ARG REPO_URL
ARG BRANCH_NAME
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