fix: add explicit --context and --file to all docker build commands

This commit is contained in:
2026-05-14 18:17:53 -07:00
parent 9a6188b2ae
commit 56a56e590e
2 changed files with 11 additions and 3 deletions
+3 -1
View File
@@ -52,9 +52,11 @@ jobs:
- name: Build and push CI base image
run: |
WORKSPACE_DIR="$GITHUB_WORKSPACE"
# Build with multiple tags
docker build \
--file Dockerfile.ci-base \
--context "$WORKSPACE_DIR" \
--file "$WORKSPACE_DIR/Dockerfile.ci-base" \
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-base:latest \
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-base:playwright-${{ steps.meta.outputs.playwright_version }} \
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-base:${{ github.sha }} \
+8 -2
View File
@@ -110,11 +110,14 @@ jobs:
- name: Build test-capable image
if: steps.commit.outputs.committed == 'true'
run: |
WORKSPACE_DIR="$GITHUB_WORKSPACE"
docker build \
--context "$WORKSPACE_DIR" \
--file "$WORKSPACE_DIR/Dockerfile" \
--target test-runner \
--build-arg GIT_COMMIT=${{ github.sha }} \
-t ${{ env.IMAGE_NAME }}-test:${{ steps.version.outputs.new_version }} \
.
"$WORKSPACE_DIR"
- name: Run tests inside test-capable container
if: steps.commit.outputs.committed == 'true'
@@ -127,12 +130,15 @@ jobs:
- name: Build production image
if: steps.commit.outputs.committed == 'true'
run: |
WORKSPACE_DIR="$GITHUB_WORKSPACE"
docker build \
--context "$WORKSPACE_DIR" \
--file "$WORKSPACE_DIR/Dockerfile" \
--target runner \
--build-arg GIT_COMMIT=${{ github.sha }} \
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.new_version }} \
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
.
"$WORKSPACE_DIR"
- name: Push Docker images
if: steps.commit.outputs.committed == 'true'