File tree 4 files changed +29
-8
lines changed
4 files changed +29
-8
lines changed Original file line number Diff line number Diff line change 18
18
required : false
19
19
type : string
20
20
default : ' '
21
+ edit_dockerfile :
22
+ description : ' If set to true, "include" only outputs apps associated to this parent image type with no internal dependencies (e.g. common -> mini)'
23
+ required : false
24
+ type : boolean
25
+ default : false
21
26
outputs :
22
27
parent_image_type :
23
28
description : ' List[str] of parent image types'
55
60
bash cicd-deployment-scripts/pi/matrix.sh \
56
61
-p "${{ github.event.pull_request.number || '' }}" \
57
62
-s cicd-deployment-scripts/pi/settings.sh \
58
- -t "${{ inputs.parent_image_type }}"
63
+ -t "${{ inputs.parent_image_type }}" \
64
+ -d "${{ inputs.edit_dockerfile }}"
Original file line number Diff line number Diff line change 19
19
with :
20
20
repository : ${{ github.repository }}
21
21
parent_image_type : ${{ vars.PARENT_IMAGE_TYPE }}
22
+ edit_dockerfile : true
22
23
23
24
pi-edit :
24
25
name : ' Parent Images: Dockerfile' # suffix populated by matrix
48
49
49
50
- name : Perform Edit/Git Operations
50
51
run : |
52
+ git branch -D "$HEAD_REF" || true
53
+ git checkout -b "$HEAD_REF"
54
+
51
55
bash cicd-deployment-scripts/pi/edit_dockerfile.sh \
52
56
-i ${{ env.PARENT_IMAGE_NAME }} \
53
57
-t ${{ matrix.parent_image_type }} \
63
67
git config user.email "[email protected] "
64
68
git config user.name "GitHub Actions"
65
69
66
- git branch -D "$HEAD_REF" || true
67
- git checkout -b "$HEAD_REF"
68
-
69
70
git add ${{ env.DOCKERFILE }}
70
71
git commit -m "$PR_TITLE" || true
71
72
git push --force origin "$HEAD_REF"
Original file line number Diff line number Diff line change 5
5
PARENT_IMAGE_TYPE=" "
6
6
PR_NUMBER=" "
7
7
SOURCE_SCRIPT=" pi/settings.sh"
8
+ EDIT_DOCKERFILE=false
8
9
9
- while getopts t:p:s: flag
10
+ while getopts t:p:s:d: flag
10
11
do
11
12
case " ${flag} " in
12
13
t) PARENT_IMAGE_TYPE=${OPTARG} ;;
13
14
p) PR_NUMBER=${OPTARG} ;;
14
15
s) SOURCE_SCRIPT=${OPTARG} ;;
16
+ d) EDIT_DOCKERFILE=${OPTARG} ;;
15
17
esac
16
18
done
17
19
@@ -40,7 +42,11 @@ PARENT_IMAGE_TYPES=""
40
42
INCLUDES=" "
41
43
for parent_image_type in " ${UPDATED_PARENT_TYPES[@]} " ; do
42
44
PARENT_IMAGE_TYPES+=" \" $parent_image_type \" ,"
43
- eval ' APP_REPOS=( "${' $( echo ${parent_image_type} | sed " s|-|_|g" ) ' [@]}" )'
45
+ if [ $EDIT_DOCKERFILE = true ]; then
46
+ eval ' APP_REPOS=( "${' $( echo ${parent_image_type} _dockerfile | sed " s|-|_|g" ) ' [@]}" )'
47
+ else
48
+ eval ' APP_REPOS=( "${' $( echo ${parent_image_type} | sed " s|-|_|g" ) ' [@]}" )'
49
+ fi
44
50
for app in " ${APP_REPOS[@]} " ; do
45
51
INCLUDES+=' { "parent_image_type": "' ${parent_image_type} ' ", "app": "' ${app} ' " },'
46
52
done
Original file line number Diff line number Diff line change @@ -9,21 +9,29 @@ export torch_cuda=(
9
9
" refinery-embedder"
10
10
)
11
11
12
- export common =(
12
+ export common_dockerfile =(
13
13
" refinery-gateway"
14
14
" refinery-neural-search"
15
15
" refinery-tokenizer"
16
16
" refinery-updater"
17
17
" refinery-weak-supervisor"
18
18
" refinery-model-provider"
19
19
" cognition-gateway"
20
+ )
21
+
22
+ export common=(
23
+ " ${common_dockerfile[@]} "
20
24
" ${torch_cpu[@]} "
21
25
" ${torch_cuda[@]} "
22
26
)
23
27
24
- export mini =(
28
+ export mini_dockerfile =(
25
29
" refinery-authorizer"
26
30
" refinery-gateway-proxy"
31
+ )
32
+
33
+ export mini=(
34
+ " ${mini_dockerfile[@]} "
27
35
" ${common[@]} "
28
36
)
29
37
You can’t perform that action at this time.
0 commit comments