Update dockerfile setup to use mamba by ayushdg · Pull Request #583 · dask-contrib/dask-sql

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably consolidate the checks on whether or not to push the docker images by adding something like this to the job itself:

  push_to_registry:
    name: Push Docker image to Docker Hub
    runs-on: ubuntu-latest
    env:
      DOCKER_PUSH: ${{ github.event_name == 'push' && github.repository == 'dask-contrib/dask-sql' }}
    if: github.repository == 'dask-contrib/dask-sql'

Don't think we need to check the github.ref condition as the on.push condition should ensure that it is always true if github.event_name == 'push'.

Also think we might be able to remove theif condition from the job itself? Assuming that we would only be pushing Docker images on pushes to this repo, we don't really lose much by having this extra CI running on forks.