-
-
Notifications
You must be signed in to change notification settings - Fork 143
55 lines (49 loc) · 1.88 KB
/
build-docker-images.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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