fix: add explicit --context and --file to all docker build commands
This commit is contained in:
@@ -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 }} \
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user