Skip to content

Commit 4ae8fc9

Browse files
committedApr 5, 2025·
[build] get the workflows to call each other the right way
1 parent e915b39 commit 4ae8fc9

File tree

5 files changed

+36
-50
lines changed

5 files changed

+36
-50
lines changed
 

‎.github/workflows/nightly.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ on:
2121
- grid
2222
- dotnet
2323
- javascript
24+
workflow_call:
25+
inputs:
26+
language:
27+
required: false
28+
type: string
29+
default: "all"
2430

2531
jobs:
2632
ruby:
27-
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'ruby' || github.event_name == 'schedule')
33+
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'ruby' || inputs.language == 'all' || github.event_name == 'schedule')
2834
name: Ruby
2935
uses: ./.github/workflows/bazel.yml
3036
strategy:
@@ -57,7 +63,7 @@ jobs:
5763
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
5864

5965
python:
60-
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'python' || github.event_name == 'schedule')
66+
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'python' || inputs.language == 'all' || github.event_name == 'schedule')
6167
name: Python
6268
uses: ./.github/workflows/bazel.yml
6369
with:
@@ -84,7 +90,7 @@ jobs:
8490
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
8591

8692
java:
87-
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'java' || github.event_name == 'schedule')
93+
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'java' || inputs.language == 'all' || github.event_name == 'schedule')
8894
name: Java
8995
uses: ./.github/workflows/bazel.yml
9096
with:
@@ -111,7 +117,7 @@ jobs:
111117
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
112118

113119
dotnet:
114-
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'dotnet' || github.event_name == 'schedule')
120+
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'dotnet' || inputs.language == 'all' || github.event_name == 'schedule')
115121
name: DotNet
116122
uses: ./.github/workflows/bazel.yml
117123
with:
@@ -139,7 +145,7 @@ jobs:
139145
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
140146

141147
grid:
142-
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'grid' || github.event_name == 'schedule')
148+
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'grid' || inputs.language == 'all' || github.event_name == 'schedule')
143149
name: Grid
144150
uses: ./.github/workflows/bazel.yml
145151
with:
@@ -166,7 +172,7 @@ jobs:
166172
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
167173

168174
javascript:
169-
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'javascript' || github.event_name == 'schedule')
175+
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'javascript' || inputs.language == 'all' || github.event_name == 'schedule')
170176
name: JavaScript
171177
uses: ./.github/workflows/bazel.yml
172178
with:

‎.github/workflows/stage-release.yml

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
steps:
2929
- name: Checkout repo
3030
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
3133
- name: Extract version from branch name
3234
if: github.event.pull_request.merged == true
3335
run: |

‎.github/workflows/update-docs-after-action.yml

+16-38
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,29 @@ name: Update Version After Docs Merge
22

33
on:
44
pull_request:
5-
types: [closed]
5+
types: [ closed ]
66
branches:
77
- gh-pages
88
paths:
99
- 'docs/api/**'
1010

1111
jobs:
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 "selenium-ci@users.noreply.github.com"
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 <selenium-ci@users.noreply.github.com>
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

‎.github/workflows/update-documentation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
branch: api-docs-${{ inputs.version }}
8686
base: gh-pages
8787
add-paths: docs/api/**
88-
title: Update documentation for Selenium ${{ inputs.version }}
88+
title: Update documentation for Selenium ${{ inputs.version }}-${{ inputs.language }}
8989
body: |
9090
This PR updates the API documentation for version **${{ inputs.version }}-${{ inputs.language }}**.
9191

‎Rakefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1120,11 +1120,11 @@ namespace :all do
11201120

11211121
desc 'Update all API Documentation'
11221122
task :docs do
1123-
Rake::Task['java:docs'].invoke(true)
1124-
Rake::Task['py:docs'].invoke(true)
1125-
Rake::Task['rb:docs'].invoke(true)
1126-
Rake::Task['dotnet:docs'].invoke(true)
1127-
Rake::Task['node:docs'].invoke(true)
1123+
Rake::Task['java:docs'].invoke(['skip_updates'])
1124+
Rake::Task['py:docs'].invoke(['skip_updates'])
1125+
Rake::Task['rb:docs'].invoke(['skip_updates'])
1126+
Rake::Task['dotnet:docs'].invoke(['skip_updates'])
1127+
Rake::Task['node:docs'].invoke(['skip_updates'])
11281128

11291129
update_gh_pages
11301130
end

0 commit comments

Comments
 (0)
Please sign in to comment.