8
8
required : true
9
9
type : string
10
10
default : ' true'
11
+ reuse-base :
12
+ description : ' Reuse base image to build'
13
+ required : false
14
+ type : boolean
15
+ default : true
11
16
grid-version :
12
- description : ' Grid version to build. E.g: 4.28.1'
17
+ description : ' Grid version to build. E.g: 4.28.1. Must provide if reusing base image '
13
18
required : false
14
19
type : string
15
- browser-version :
16
- description : ' Browser version to build. E.g: 120'
17
- required : true
20
+ default : ' '
21
+ build-date :
22
+ description : ' Build date in format YYYYMMDD. Must provide if reusing base image'
23
+ required : false
18
24
type : string
25
+ default : ' '
19
26
browser-name :
20
27
description : ' Browser name to build. E.g: chrome'
21
28
required : true
22
29
type : string
23
30
default : ' chrome'
31
+ browser-version :
32
+ description : ' Browser version to build. E.g: 120'
33
+ required : true
34
+ type : string
24
35
push-image :
25
- description : ' Push images to registry after build & test is successful '
26
- required : false
36
+ description : ' Push image after testing successfully '
37
+ required : true
27
38
type : boolean
28
39
default : true
29
- build-date :
30
- description : ' Build date'
31
- required : false
32
- type : string
33
- default : ' '
40
+
41
+ env :
42
+ GRID_VERSION : ${{ github.event.inputs.grid-version }}
43
+ BROWSER_NAME : ${{ github.event.inputs.browser-name }}
44
+ BROWSER_VERSION : ${{ github.event.inputs.browser-version }}
45
+ REUSE_BASE : ${{ github.event.inputs.reuse-base || true }}
46
+ BUILD_DATE : ${{ github.event.inputs.build-date || '' }}
47
+ NAMESPACE : ${{ vars.DOCKER_NAMESPACE || 'selenium' }}
48
+ AUTHORS : ${{ vars.AUTHORS || 'SeleniumHQ' }}
49
+ PUSH_IMAGE : ${{ github.event.inputs.push-image || false }}
34
50
35
51
jobs :
36
52
deploy :
37
- name : Deploy and Release
53
+ name : Deploy Node/Standalone Chrome with specific browser version
38
54
runs-on : ubuntu-24.04
39
55
permissions : write-all
40
56
steps :
41
- - name : Free Disk Space (Ubuntu)
42
- uses : jlumbroso/free-disk-space@main
43
- with :
44
- tool-cache : false
45
- large-packages : false
46
57
- name : Checkout code
47
58
uses : actions/checkout@main
48
59
with :
70
81
echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV
71
82
fi
72
83
echo "NAME=${NAMESPACE}" >> $GITHUB_ENV
73
- cat .env | xargs -I {} echo {} >> $GITHUB_ENV
74
- env :
75
- NAMESPACE : ${{ vars.DOCKER_NAMESPACE || 'selenium' }}
76
- AUTHORS : ${{ vars.AUTHORS || 'SeleniumHQ' }}
77
- BUILD_DATE : ${{ github.event.inputs.build-date || '' }}
78
84
- name : Get Grid version
85
+ if : env.GRID_VERSION == ''
79
86
run : |
80
87
echo ${BASE_VERSION}
81
88
echo "GRID_VERSION=${BASE_VERSION}" >> $GITHUB_ENV
@@ -86,21 +93,24 @@ jobs:
86
93
env :
87
94
DOCKER_USERNAME : ${{secrets.DOCKER_USERNAME}}
88
95
DOCKER_PASSWORD : ${{secrets.DOCKER_PASSWORD}}
89
- - name : Build images
96
+ - name : Build images with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
90
97
run : |
91
- ./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME}
92
- make hub
93
- env :
94
- GRID_VERSION : ${{ github.event.inputs.grid-version || env.GRID_VERSION }}
95
- BROWSER_VERSION : ${{ github.event.inputs.browser-version }}
96
- BROWSER_NAME : ${{ github.event.inputs.browser-name }}
97
- - name : Test images
98
+ ./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE}
99
+ - name : Build Hub image for testing
100
+ if : env.REUSE_BASE == 'false'
101
+ run : make hub
102
+ - name : Test images with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
98
103
run : |
99
104
make test_chrome
100
- - name : Push images
105
+ make test_chrome_standalone
106
+ - name : Push images with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }}
107
+ if : env.PUSH_IMAGE == 'true'
101
108
run : |
102
- ./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} true
103
- env :
104
- GRID_VERSION : ${{ github.event.inputs.grid-version || env.GRID_VERSION }}
105
- BROWSER_VERSION : ${{ github.event.inputs.browser-version }}
106
- BROWSER_NAME : ${{ github.event.inputs.browser-name }}
109
+ ./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE} true true
110
+ - name : Upload changelog
111
+ if : always()
112
+ uses : actions/upload-artifact@main
113
+ with :
114
+ name : image_tags_${{ env.GRID_VERSION }}_${{ env.BROWSER_NAME }}_${{ env.BROWSER_VERSION }}
115
+ path : ./CHANGELOG/${{ env.GRID_VERSION }}/${{ env.BROWSER_NAME }}_${{ env.BROWSER_VERSION }}.md
116
+ if-no-files-found : ignore
0 commit comments