-
-
Notifications
You must be signed in to change notification settings - Fork 339
60 lines (53 loc) · 2.04 KB
/
docker-build.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
56
57
58
59
60
name: Create and publish Docker images with specific build args
on:
workflow_dispatch:
push:
branches:
- main
- dev
jobs:
build-main-image:
uses: ./.github/workflows/build-docker-image.yaml
with:
image_name: ${{ github.repository }}
cache_id: main
build-cuda-image:
uses: ./.github/workflows/build-docker-image.yaml
with:
image_name: ${{ github.repository }}
cache_id: cuda
image_tag: type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=cuda
extract_flavor: suffix=-cuda,onlatest=true
build_args: |
USE_CUDA=true
build-minimum-image:
uses: ./.github/workflows/build-docker-image.yaml
with:
image_name: ${{ github.repository }}
cache_id: minimum
image_tag: type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=minimum
extract_flavor: suffix=-minimum,onlatest=true
build_args: |
MINIMUM_BUILD=true
merge-main-images:
uses: ./.github/workflows/merge-docker-images.yaml
needs: [build-main-image]
with:
image_name: ${{ github.repository }}
cache_id: main
merge-cuda-images:
uses: ./.github/workflows/merge-docker-images.yaml
needs: [build-cuda-image]
with:
image_name: ${{ github.repository }}
cache_id: cuda
extract_flavor: suffix=-cuda,onlatest=true
extract_tags: type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=cuda
merge-minimum-images:
uses: ./.github/workflows/merge-docker-images.yaml
needs: [build-minimum-image]
with:
image_name: ${{ github.repository }}
cache_id: minimum
extract_flavor: suffix=-minimum,onlatest=true
extract_tags: type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=minimum