diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c0be8c82..b6c1b665 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,3 +36,44 @@ jobs: - name: Test with pytest run: | pytest + + docker-test: + runs-on: ubuntu-latest + needs: + - test + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + datacontract/cli + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + # try to disable qemu + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + # linux/arm64 is disabled + # duckdb currently does not support linux_arm64_gcc4 + # https://duckdb.org/docs/extensions/working_with_extensions#platforms + platforms: linux/amd64,linux/arm64 +# push: ${{ github.event_name != 'pull_request' }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9f3553af..3450d61b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ENV PATH="/opt/venv/bin:$PATH" WORKDIR /app COPY pyproject.toml . COPY datacontract/ datacontract/ -RUN pip3 --no-cache-dir install . +RUN pip3 install --upgrade pip && pip3 --no-cache-dir install . RUN python -c "import duckdb; duckdb.connect().sql(\"INSTALL httpfs\");" FROM ubuntu:22.04 AS runner-image