-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (121 loc) · 4.14 KB
/
build-docker.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: build-docker-images
on:
push:
branches: [ main ]
paths-ignore:
- "*.md"
pull_request:
branches: [ main ]
paths-ignore:
- "*.md"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
REGISTRY_URL: "docker.io" # docker.io or other registry URL, DOCKER_REGISTRY_USERNAME/DOCKER_REGISTRY_PASSWORD to be set in CI env.
BUILDKIT_PROGRESS: "plain" # Full logs for CI build.
# DOCKER_REGISTRY_USERNAME and DOCKER_REGISTRY_PASSWORD is required for docker image push, they should be set in CI secrets.
DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
# used to sync image to mirror registry
DOCKER_MIRROR_REGISTRY_USERNAME: ${{ secrets.DOCKER_MIRROR_REGISTRY_USERNAME }}
DOCKER_MIRROR_REGISTRY_PASSWORD: ${{ secrets.DOCKER_MIRROR_REGISTRY_PASSWORD }}
jobs:
## Clash
docker_clash:
name: 'app-clash'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
source ./tool.sh && build_image app-clash latest docker_app_clash/Dockerfile && push_image
## Casdoor
docker_casdoor:
name: 'casdoor'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
source ./tool.sh && build_image casdoor latest docker_casdoor/Dockerfile && push_image
## Keycloak
docker_keycloak:
name: 'keycloak'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
source ./tool.sh && build_image keycloak latest docker_keycloak/Dockerfile && push_image
## DevHub
qpod_dev-hub:
name: 'dev-hub'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
source ./tool.sh
build_image dev-hub latest docker_dev_box/hub.Dockerfile \
--build-arg "BASE_IMG=node" \
--build-arg "ARG_PROFILE_JUPYTER=hub"
push_image
## OpenResty as gateway
qpod_openresty:
name: 'openresty'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
source ./tool.sh
build_image openresty latest docker_openresty/Dockerfile
push_image
## DevBox - base
qpod_base-dev:
name: 'developer,base-dev'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
source ./tool.sh && free_diskspace
build_image base-dev latest docker_dev_box/Dockerfile \
--build-arg "BASE_IMG=node" \
--build-arg "ARG_PROFILE_JUPYTER=base,kernels,extensions" \
--build-arg "ARG_PROFILE_VSCODE=base"
alias_image base-dev latest developer latest && push_image dev
## DevBox - full stack
qpod_data-science-dev:
name: 'data-science-dev'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
source ./tool.sh && free_diskspace
build_image data-science-dev latest docker_dev_box/Dockerfile \
--build-arg "BASE_IMG=data-science-stack" \
--build-arg "ARG_PROFILE_JUPYTER=base,kernels,extensions" \
--build-arg "ARG_PROFILE_VSCODE=base"
push_image
## DevBox - cuda
qpod_cuda-dev:
name: 'full-cuda,cuda-dev'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
source ./tool.sh && free_diskspace
build_image cuda-dev latest docker_dev_box/Dockerfile \
--build-arg "BASE_IMG=core-cuda" \
--build-arg "ARG_PROFILE_JUPYTER=base,kernels,extensions" \
--build-arg "ARG_PROFILE_VSCODE=base"
alias_image cuda-dev latest full-cuda latest && push_image
## Sync all images in this build (listed by "names") to mirror registry.
sync_images:
needs: ["qpod_cuda-dev"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
source ./tool.sh
printenv > /tmp/docker.env
docker run --rm \
--env-file /tmp/docker.env \
-v $(pwd):/tmp \
-w /tmp \
${DOCKER_IMG_PREFIX:-qpod}/docker-kit python /opt/utils/image-syncer/run_jobs.py