88 required : true
99 type : string
1010 default : ' true'
11+ reuse-base :
12+ description : ' Reuse base image to build'
13+ required : false
14+ type : boolean
15+ default : true
1116 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 '
1318 required : false
1419 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
1824 type : string
25+ default : ' '
1926 browser-name :
2027 description : ' Browser name to build. E.g: chrome'
2128 required : true
2229 type : string
2330 default : ' chrome'
31+ browser-version :
32+ description : ' Browser version to build. E.g: 120'
33+ required : true
34+ type : string
2435 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
2738 type : boolean
2839 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 }}
3450
3551jobs :
3652 deploy :
37- name : Deploy and Release
53+ name : Deploy Node/Standalone Chrome with specific browser version
3854 runs-on : ubuntu-24.04
3955 permissions : write-all
4056 steps :
41- - name : Free Disk Space (Ubuntu)
42- uses : jlumbroso/free-disk-space@main
43- with :
44- tool-cache : false
45- large-packages : false
4657 - name : Checkout code
4758 uses : actions/checkout@main
4859 with :
7081 echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV
7182 fi
7283 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 || '' }}
7884 - name : Get Grid version
85+ if : env.GRID_VERSION == ''
7986 run : |
8087 echo ${BASE_VERSION}
8188 echo "GRID_VERSION=${BASE_VERSION}" >> $GITHUB_ENV
@@ -86,21 +93,24 @@ jobs:
8693 env :
8794 DOCKER_USERNAME : ${{secrets.DOCKER_USERNAME}}
8895 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 }}
9097 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 }}
98103 run : |
99104 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'
101108 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