-
Notifications
You must be signed in to change notification settings - Fork 189
111 lines (92 loc) · 3.23 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
name: Docker Images
on:
workflow_dispatch:
inputs:
build_admin_image:
description: 'Build admin image (aistorage/admin)'
required: true
type: boolean
default: true
build_aisnode_image:
description: 'Build aisnode image (aistorage/aisnode)'
required: true
type: boolean
default: true
build_cluster_minimal_image:
description: 'Build cluster-minimal image (aistorage/cluster-minimal)'
required: true
type: boolean
default: true
build_gitlab_ci_image:
description: 'Build GitLab CI image (aistorage/ci)'
required: true
type: boolean
default: true
build_aisnode_minikube_image:
description: 'Build aisnode-minikube image (aistorage/aisnode-minikube)'
required: true
type: boolean
default: true
build_ais_init_image:
description: 'Build ais-init image (aistorage/ais-init)'
required: true
type: boolean
default: true
image_tag:
description: 'Tag of all the selected images'
required: true
default: 'latest'
env:
ADMIN_IMAGE: 'aistorage/admin'
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'
HDFS_CI_IMAGE: 'aistorage/hdfs-ci'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: aisadmin image
if: ${{ inputs.build_admin_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/prod/k8s/aisadmin_container
IMAGE_REPO="${{ env.ADMIN_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e all
popd
- name: 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: ais-init image
if: ${{ inputs.build_ais_init_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/prod/k8s/init_container
IMAGE_REPO="${{ env.AISINIT_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e all
popd
- name: 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: ci image
if: ${{ inputs.build_gitlab_ci_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/ci
CI_IMAGE="${{ env.CI_IMAGE }}" HDFS_CI_IMAGE=${{ env.HDFS_CI_IMAGE }} IMAGE_TAG="${{ inputs.image_tag }}" make -e all
popd
- name: 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