ci: clone cal-shared locally for Docker build
CI/CD / deploy (push) Successful in 1m21s
Details
CI/CD / deploy (push) Successful in 1m21s
Details
Gitea archive endpoint returns 500. Clone cal-shared repo and use as local file dependency in Docker build. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d46eda6d17
commit
81794f09b4
|
|
@ -31,7 +31,8 @@ jobs:
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
run: |
|
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
|
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 }}:${{ env.IMAGE_TAG }}
|
||||||
docker push ${{ env.IMAGE }}:latest
|
docker push ${{ env.IMAGE }}:latest
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,12 @@ FROM node:20-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files and local dependency
|
||||||
COPY package.json package-lock.json* ./
|
COPY package.json package-lock.json* ./
|
||||||
|
COPY cal-shared/ ./cal-shared/
|
||||||
|
|
||||||
# Replace Gitea public URL with internal for CI builds
|
# Replace Gitea archive URL with local copy for CI builds
|
||||||
RUN sed -i 's|https://gitea.jeffemmett.com|http://localhost:3000|g' package.json
|
RUN sed -i 's|https://gitea.jeffemmett.com/jeffemmett/cal-shared/archive/main.tar.gz|file:./cal-shared|g' package.json
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue