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
|
||||
run: |
|
||||
docker build --no-cache \
|
||||
--build-arg COMMIT_SHA=${{ steps.sha.outputs.short_sha }} \
|
||||
-t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \
|
||||
-t "${IMAGE}:latest" \
|
||||
.
|
||||
|
||||
@@ -15,6 +15,10 @@ RUN pnpm install --frozen-lockfile --ignore-scripts
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
# Pass commit SHA at build time
|
||||
ARG COMMIT_SHA=dev
|
||||
ENV COMMIT_SHA=${COMMIT_SHA}
|
||||
|
||||
# Build Next.js app
|
||||
RUN pnpm run build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user