Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ jobs:

- name: Login to DockerHub
uses: docker/login-action@v1
if: github.repository == 'dask/dask-docker' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
if: github.repository == 'dask/dask-docker' && github.event_name == 'push'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
if: github.repository == 'dask/dask-docker' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
if: github.repository == 'dask/dask-docker' && github.event_name == 'push'
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -69,12 +69,22 @@ jobs:
env:
image: ${{ matrix.image.tag }}
python: ${{ matrix.python }}
stable: ${{ startsWith(github.ref, 'refs/tags') }}
run: |
tag="${image}:${release}-py${python}"
tags=$tag
if [ "$python" == "$defaultpython" ]; then
tags=${image}:latest,${image}:${release},$tags
if [ "$stable" == "true" ]; then
tag="${image}:${release}-py${python}"
tags=$tag
if [ "$python" == "$defaultpython" ]; then
tags=${image}:latest,${image}:${release},$tags
fi
else
tag="${image}:dev-py${python}"
tags=$tag
if [ "$python" == "$defaultpython" ]; then
tags=${image}:dev,$tags
fi
fi

echo "::set-output name=tags::${tags}"
echo "::set-output name=tag::${tag}"

Expand Down Expand Up @@ -102,7 +112,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: ${{ matrix.image.context }}
push: ${{ github.repository == 'dask/dask-docker' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
push: ${{ github.repository == 'dask/dask-docker' && github.event_name == 'push' }}
platforms: linux/amd64
tags: ${{ steps.tags.outputs.tags }}
build-args: |
Expand Down