docker-images-build #1234
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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 |