fix: pass COMMIT_SHA build arg to Docker for CI status display
Build & Push Portfolio Image / build-push (push) Successful in 3m27s
Build & Push Portfolio Image / build-push (push) Successful in 3m27s
This commit is contained in:
@@ -53,6 +53,7 @@ jobs:
|
|||||||
- name: Build image
|
- name: Build image
|
||||||
run: |
|
run: |
|
||||||
docker build --no-cache \
|
docker build --no-cache \
|
||||||
|
--build-arg COMMIT_SHA=${{ steps.sha.outputs.short_sha }} \
|
||||||
-t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \
|
-t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \
|
||||||
-t "${IMAGE}:latest" \
|
-t "${IMAGE}:latest" \
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ RUN pnpm install --frozen-lockfile --ignore-scripts
|
|||||||
# Copy source
|
# Copy source
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Pass commit SHA at build time
|
||||||
|
ARG COMMIT_SHA=dev
|
||||||
|
ENV COMMIT_SHA=${COMMIT_SHA}
|
||||||
|
|
||||||
# Build Next.js app
|
# Build Next.js app
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user