-
Notifications
You must be signed in to change notification settings - Fork 175
116 lines (99 loc) · 3.75 KB
/
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
name: Container Images
on:
workflow_dispatch:
inputs:
build_util_image:
description: 'Build ais-util image (aistorage/ais-util)'
required: true
type: boolean
default: false
build_aisnode_image:
description: 'Build aisnode image (aistorage/aisnode)'
required: true
type: boolean
default: false
build_aisinit_image:
description: 'Build aisinit image (aistorage/ais-init)'
required: true
type: boolean
default: false
build_cluster_minimal_image:
description: 'Build cluster-minimal image (aistorage/cluster-minimal)'
required: true
type: boolean
default: false
build_aisnode_minikube_image:
description: 'Build aisnode-minikube image (aistorage/aisnode-minikube)'
required: true
type: boolean
default: false
build_authn_image:
description: 'Build AuthN (aistorage/authn)'
required: true
type: boolean
default: false
image_tag:
description: 'Tag of all the selected images'
required: true
default: 'latest'
env:
UTIL_IMAGE: 'aistorage/ais-util'
AISNODE_IMAGE: 'aistorage/aisnode'
AISINIT_IMAGE: 'aistorage/ais-init'
CLUSTER_MINIMAL_IMAGE: 'aistorage/cluster-minimal'
CI_IMAGE: 'aistorage/ci'
AISNODE_MINIKUBE_IMAGE: 'aistorage/aisnode-minikube'
AUTHN_IMAGE: 'aistorage/authn'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push `ais-util` image
if: ${{ inputs.build_util_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/prod/k8s/aisutil_container
IMAGE_REPO="${{ env.UTIL_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e all
popd
- name: Build and push `aisnode` image
if: ${{ inputs.build_aisnode_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/prod/k8s/aisnode_container
IMAGE_REPO="${{ env.AISNODE_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e all
popd
- name: Build and push `ais-init` image
if: ${{ inputs.build_aisinit_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/prod/k8s/aisinit_container
IMAGE_REPO="${{ env.AISINIT_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e all
popd
- name: Build and push `aisnode` image with tracing support
if: ${{ inputs.build_aisnode_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/prod/k8s/aisnode_container
IMAGE_REPO="${{ env.AISNODE_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}-oteltracing" BUILD_TAGS="oteltracing" make -e all
popd
- name: Build and push `cluster-minimal` image
if: ${{ inputs.build_cluster_minimal_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/prod/docker/single
IMAGE_REPO="${{ env.CLUSTER_MINIMAL_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e all
popd
- name: Build and push `aisnode-minikube` image
if: ${{ inputs.build_aisnode_minikube_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/dev/k8s
IMAGE_REPO="${{ env.AISNODE_MINIKUBE_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e docker-all
popd
- name: Build and push `authn` image
if: ${{ inputs.build_authn_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/prod/k8s/authn_container
IMAGE_REPO="${{ env.AUTHN_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make all
popd