@@ -2,51 +2,29 @@ name: Update Version After Docs Merge
22
33on :
44 pull_request :
5- types : [closed]
5+ types : [ closed ]
66 branches :
77 - gh-pages
88 paths :
99 - ' docs/api/**'
1010
1111jobs :
12- update-version :
13- if : github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'Update documentation for Selenium')
12+ parse-pr-title :
1413 runs-on : ubuntu-latest
14+ if : github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'Update documentation for Selenium')
15+ outputs :
16+ language : ${{ steps.extract-language.outputs.language }}
1517 steps :
16- - name : Checkout trunk branch
17- uses : actions/checkout@v4
18- with :
19- ref : trunk
20- token : ${{ secrets.SELENIUM_CI_TOKEN }}
21-
22- - name : Setup git
18+ - name : Extract language from PR title
19+ id : extract-language
2320 run : |
24- git config --local user.email "[email protected] " 25- git config --local user.name "Selenium CI Bot"
26-
27- - name : Update versions to nightly
28- run : ./go all:version nightly
29-
30- - name : Bump Nightly Versions Pull Request
31- id : cpr
32- uses : peter-evans/create-pull-request@v6
33- with :
34- token : ${{ secrets.SELENIUM_CI_TOKEN }}
35- author :
Selenium CI Bot <[email protected] > 36- delete-branch : true
37- branch : bump-nightly-version
38- title : Update to nightly versions
39- body : |
40- This PR bumps the bindings to nightly versions after merging
41- the PR updating the API documentation.
21+ PR_TITLE="${{ github.event.pull_request.title }}"
22+ LANGUAGE=$(echo "$PR_TITLE" | grep -o '[^-]*$')
23+ echo "language=$LANGUAGE" >> $GITHUB_OUTPUT
24+ update-version :
25+ needs : parse-pr-title
26+ uses : ./.github/workflows/nightly.yml
27+ with :
28+ language : ${{ needs.parse-pr-title.outputs.language }}
29+ secrets : inherit
4230
43- - Auto-generated by [workflow run #${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
44- labels : B-docs
45- draft : false
46- - name : Enable Pull Request Auto-merge
47- if : steps.cpr.outputs.pull-request-operation == 'created'
48- uses : peter-evans/enable-pull-request-automerge@v3
49- with :
50- token : ${{ secrets.SELENIUM_CI_TOKEN }}
51- pull-request-number : ${{ steps.cpr.outputs.pull-request-number }}
52- merge-method : squash
0 commit comments