2222        description : ' Build date in format YYYYMMDD. Must provide if reusing base image' 
2323        required : false 
2424        type : string 
25-         default : ' ' 
25+         default : ' 20250123 ' 
2626      browser-name :
2727        description : ' Browser name to build. E.g: chrome' 
2828        required : true 
2929        type : string 
3030        default : ' chrome' 
31-       browser-version  :
32-         description : ' Browser  version to build. E.g: 120 ' 
31+       browser-versions  :
32+         description : ' List browser  version to build. E.g: [130, 131] ' 
3333        required : true 
34-         type :  string 
34+         default :  ' [109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132] ' 
3535      push-image :
3636        description : ' Push image after testing successfully' 
3737        required : true 
3838        type : boolean 
39+         default : false 
40+       pr-changelog :
41+         description : ' Create a PR for CHANGELOG' 
42+         required : true 
43+         type : boolean 
3944        default : true 
4045
4146env :
4247  GRID_VERSION : ${{ github.event.inputs.grid-version }} 
4348  BROWSER_NAME : ${{ github.event.inputs.browser-name }} 
44-   BROWSER_VERSION : ${{ github.event.inputs.browser-version }} 
4549  REUSE_BASE : ${{ github.event.inputs.reuse-base || true }} 
4650  BUILD_DATE : ${{ github.event.inputs.build-date || '' }} 
4751  NAMESPACE : ${{ vars.DOCKER_NAMESPACE || 'selenium' }} 
4852  AUTHORS : ${{ vars.AUTHORS || 'SeleniumHQ' }} 
4953  PUSH_IMAGE : ${{ github.event.inputs.push-image || false }} 
54+   PR_CHANGELOG : ${{ github.event.inputs.pr-changelog || true }} 
55+   RUN_ID : ${{ github.run_id }} 
5056
5157jobs :
5258  deploy :
53-     name : Deploy Node/Standalone Chrome with specific browser version  
59+     name : Deploy Node/Standalone Chrome 
5460    runs-on : ubuntu-24.04 
5561    permissions : write-all 
62+     strategy :
63+       fail-fast : false 
64+       matrix :
65+         browser-version : ${{ fromJSON(github.event.inputs.browser-versions)}} 
66+     outputs :
67+       GRID_VERSION : ${{ steps.display_grid_version.outputs.GRID_VERSION }} 
5668    steps :
5769      - name : Checkout code 
5870        uses : actions/checkout@main 
@@ -81,13 +93,19 @@ jobs:
8193            echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV 
8294          fi 
8395          echo "NAME=${NAMESPACE}" >> $GITHUB_ENV 
96+           echo "BROWSER_VERSION=${BROWSER_VERSION}" >> $GITHUB_ENV 
97+ env :
98+           BROWSER_VERSION : ${{ matrix.browser-version }} 
8499      - name : Get Grid version 
85100        if : env.GRID_VERSION == '' 
86101        run : | 
87102          echo ${BASE_VERSION} 
88103          echo "GRID_VERSION=${BASE_VERSION}" >> $GITHUB_ENV 
89104name : Display Grid version 
90-         run : echo ${GRID_VERSION} 
105+         id : display_grid_version 
106+         run : | 
107+           echo ${GRID_VERSION} 
108+           echo "GRID_VERSION=${GRID_VERSION}" >> "$GITHUB_OUTPUT" 
91109name : Login Docker Hub 
92110        run : docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" 
93111        env :
@@ -114,3 +132,48 @@ jobs:
114132          name : image_tags_${{ env.GRID_VERSION }}_${{ env.BROWSER_NAME }}_${{ env.BROWSER_VERSION }} 
115133          path : ./CHANGELOG/${{ env.GRID_VERSION }}/${{ env.BROWSER_NAME }}_${{ env.BROWSER_VERSION }}.md 
116134          if-no-files-found : ignore 
135+ 
136+   pr-results :
137+     name : Create a PR with changelog 
138+     if : (!failure() && !cancelled() && (github.event.inputs.pr-changelog == 'true')) 
139+     runs-on : ubuntu-24.04 
140+     needs : deploy 
141+     steps :
142+       - name : Checkout code 
143+         uses : actions/checkout@main 
144+         with :
145+           persist-credentials : false 
146+           fetch-depth : 0 
147+       - name : Get Grid version 
148+         run : | 
149+           echo "GRID_VERSION=${GRID_VERSION}" >> $GITHUB_ENV 
150+ env :
151+           GRID_VERSION : ${{ needs.deploy.outputs.GRID_VERSION }} 
152+       - name : Download results 
153+         uses : actions/download-artifact@v4 
154+         with :
155+           path : ./CHANGELOG/${{ env.GRID_VERSION }} 
156+           pattern : ' image_tags_*' 
157+           merge-multiple : ' true' 
158+           run-id : ${{ env.RUN_ID }} 
159+           github-token : ${{ secrets.GITHUB_TOKEN }} 
160+       - name : Commit configs 
161+         run : | 
162+           git config --local user.email "[email protected] " 163+           git config --local user.name "Selenium CI Bot" 
164+ name : Create Pull Request 
165+         id : cpr 
166+         uses : peter-evans/create-pull-request@main 
167+         with :
168+           token : ${{ secrets.SELENIUM_CI_TOKEN }} 
169+           commit-message : " [ci] Upload CHANGELOG for Node/Standalone ${{ env.BROWSER_NAME }} version with Grid ${{ env.GRID_VERSION }}" 
170+           title : " [ci] Upload CHANGELOG for Node/Standalone ${{ env.BROWSER_NAME }} version with Grid ${{ env.GRID_VERSION }}" 
171+           body : " This PR contains the CHANGELOG for Node/Standalone Chrome with specific browser versions: ${{ github.event.inputs.browser-versions }}" 
172+           committer : 
' Selenium CI Bot <[email protected] >'  173+           author : 
' Selenium CI Bot <[email protected] >'  174+           branch : browser-node-changelog 
175+       - name : Check outputs 
176+         if : ${{ steps.cpr.outputs.pull-request-number }} 
177+         run : | 
178+           echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" 
179+           echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" 
0 commit comments