Skip to content

docker-images-build #1649

docker-images-build

docker-images-build #1649

name: docker-images-build
on:
push:
branches: "main"
pull_request:
schedule:
- cron: "0 0 * * *" # Daily “At 00:00”
workflow_dispatch: # allows you to trigger manually
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
jobqueue: ["pbs", "sge", "slurm", "htcondor"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check versions
run: |
docker version
docker compose version
- name: Building Image
shell: bash -l {0}
run: |
cd ./ci/${{ matrix.jobqueue }}
cp ../environment.yml environment.yml
docker compose build
- name: List images
run: |
docker ps -a
docker images
- name: Publish main images to DockerHub Registry
if: github.event_name != 'pull_request' && matrix.jobqueue != 'htcondor'
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push daskdev/dask-jobqueue:${{ matrix.jobqueue }}
- name: Publish secondary SGE images to DockerHub Registry
if: github.event_name != 'pull_request' && matrix.jobqueue == 'sge'
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push daskdev/dask-jobqueue:${{ matrix.jobqueue }}-slave
#HTCondor images have composed tags.
- name: Publish HTCondor images to DockerHub Registry
if: github.event_name != 'pull_request' && matrix.jobqueue == 'htcondor'
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push daskdev/dask-jobqueue:${{ matrix.jobqueue }}-submit
docker push daskdev/dask-jobqueue:${{ matrix.jobqueue }}-execute