diff --git a/.gitea/workflows/build-ci-images.yml b/.gitea/workflows/build-ci-images.yml index 394e164..ea0a7fd 100644 --- a/.gitea/workflows/build-ci-images.yml +++ b/.gitea/workflows/build-ci-images.yml @@ -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 }} \ diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 6e906e5..0844e2b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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'