diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9bf6e0d..4ace397 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -31,7 +31,8 @@ jobs: - name: Build and push image run: | - docker build --network=host -t ${{ env.IMAGE }}:${{ env.IMAGE_TAG }} -t ${{ env.IMAGE }}:latest . + git clone --depth 1 http://jeffemmett:${{ secrets.REPO_READ_TOKEN }}@server:3000/jeffemmett/cal-shared.git cal-shared + docker build -t ${{ env.IMAGE }}:${{ env.IMAGE_TAG }} -t ${{ env.IMAGE }}:latest . echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ${{ env.REGISTRY }} -u ${{ secrets.REGISTRY_USER }} --password-stdin docker push ${{ env.IMAGE }}:${{ env.IMAGE_TAG }} docker push ${{ env.IMAGE }}:latest diff --git a/Dockerfile b/Dockerfile index e69961d..bfc4bbd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,12 @@ FROM node:20-alpine AS builder WORKDIR /app -# Copy package files +# Copy package files and local dependency COPY package.json package-lock.json* ./ +COPY cal-shared/ ./cal-shared/ -# Replace Gitea public URL with internal for CI builds -RUN sed -i 's|https://gitea.jeffemmett.com|http://localhost:3000|g' package.json +# Replace Gitea archive URL with local copy for CI builds +RUN sed -i 's|https://gitea.jeffemmett.com/jeffemmett/cal-shared/archive/main.tar.gz|file:./cal-shared|g' package.json # Install dependencies RUN npm install