-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (73 loc) · 2.69 KB
/
docker.yaml
File metadata and controls
73 lines (73 loc) · 2.69 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Docker
on:
push:
branches: "main"
pull_request:
workflow_dispatch: # allows you to trigger manually
merge_group: # GitHub Merge Queue
# concurrency:
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# cancel-in-progress: true
env:
MY_GCR_NAMESPACE: 'juliaparallel'
MY_GCR_IMAGENAME: 'dask-jobqueue-ci-images'
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
clustermanager:
- htcondor
- pbs
- sge
- slurm
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: docker version
run: |
which -a docker
docker version
docker compose version
- name: docker compose build
run: |
cd "./ci/${MATRIX_CLUSTERMANAGER:?}"
cp ../environment.yml environment.yml
docker compose build
env:
MATRIX_CLUSTERMANAGER: ${{ matrix.clustermanager }}
- name: List images
run: |
docker ps -a
docker images
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish HTCondor images
if: matrix.clustermanager == 'htcondor' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
run: |
docker push "ghcr.io/${MY_GCR_NAMESPACE:?}/${MY_GCR_IMAGENAME:?}:${MATRIX_CLUSTERMANAGER:?}-submit"
docker push "ghcr.io/${MY_GCR_NAMESPACE:?}/${MY_GCR_IMAGENAME:?}:${MATRIX_CLUSTERMANAGER:?}-execute"
env:
MATRIX_CLUSTERMANAGER: ${{ matrix.clustermanager }}
- name: Publish most images (but not HTCondor)
if: matrix.clustermanager != 'htcondor' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
run: |
docker push "ghcr.io/${MY_GCR_NAMESPACE:?}/${MY_GCR_IMAGENAME:?}:${MATRIX_CLUSTERMANAGER:?}"
env:
MATRIX_CLUSTERMANAGER: ${{ matrix.clustermanager }}
- name: Publish secondary SGE images
if: matrix.clustermanager == 'sge' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
run: |
docker push "ghcr.io/${MY_GCR_NAMESPACE:?}/${MY_GCR_IMAGENAME:?}:${MATRIX_CLUSTERMANAGER:?}-slave"
env:
MATRIX_CLUSTERMANAGER: ${{ matrix.clustermanager }}