Skip to content

Merge remote-tracking branch 'upstream/main' #36

Merge remote-tracking branch 'upstream/main'

Merge remote-tracking branch 'upstream/main' #36

Workflow file for this run

name: Build Docker image
on:
release:
types: [created]
push:
branches:
- main
pull_request:
paths:
- Cargo.toml
- Cargo.lock
- pyproject.toml
- docker/**
- .github/workflows/docker.yml
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: true
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
env:
DOCKER_PUSH: ${{ contains(['push', 'release'], github.event_name) && github.repository == 'dask-contrib/dask-sql' }}

Check failure on line 28 in .github/workflows/docker.yml

View workflow run for this annotation

GitHub Actions / Build Docker image

Invalid workflow file

The workflow is not valid. .github/workflows/docker.yml (Line: 28, Col: 20): Unexpected symbol: '['. Located at position 10 within expression: contains(['push', 'release'], github.event_name) && github.repository == 'dask-contrib/dask-sql'
strategy:
fail-fast: false
matrix:
platform: ["linux/amd64", "linux/arm64", "linux/386"]
steps:
- uses: actions/checkout@v3
- name: Login to DockerHub
if: ${{ fromJSON(env.DOCKER_PUSH) }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta for main image
id: docker_meta_main
uses: crazy-max/ghaction-docker-meta@v4
with:
images: nbraun/dask-sql
- name: Build and push main image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/main.dockerfile
build-args: DOCKER_META_VERSION=${{ steps.docker_meta_main.outputs.version }}
platforms: ${{ matrix.platform }}
tags: ${{ steps.docker_meta_main.outputs.tags }}
labels: ${{ steps.docker_meta_main.outputs.labels }}
push: ${{ fromJSON(env.DOCKER_PUSH) }}
load: ${{ !fromJSON(env.DOCKER_PUSH) }}
- name: Check images
run: |
df -h
docker image ls
docker image inspect ${{ steps.docker_meta_main.outputs.tags }}
- name: Docker meta for cloud image
id: docker_meta_cloud
uses: crazy-max/ghaction-docker-meta@v4
with:
images: nbraun/dask-sql-cloud
- name: Build and push cloud image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/cloud.dockerfile
build-args: DOCKER_META_VERSION=${{ steps.docker_meta_main.outputs.version }}
platforms: ${{ matrix.platform }}
tags: ${{ steps.docker_meta_cloud.outputs.tags }}
labels: ${{ steps.docker_meta_cloud.outputs.labels }}
push: ${{ fromJSON(env.DOCKER_PUSH) }}
load: ${{ !fromJSON(env.DOCKER_PUSH) }}