Skip to content

Commit 84a8e91

Browse files
committed
[build]: update workflow
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 24527c6 commit 84a8e91

File tree

7 files changed

+72
-34
lines changed

7 files changed

+72
-34
lines changed

.github/workflows/build-test.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: Build & test
2-
concurrency:
3-
group: ${{ github.workflow }}
42

53
on:
4+
workflow_call:
5+
inputs:
6+
release:
7+
description: 'Test a new release process'
8+
required: false
9+
type: boolean
10+
default: false
611
workflow_dispatch:
712
push:
813
paths-ignore:
@@ -15,6 +20,16 @@ permissions:
1520
contents: read
1621

1722
jobs:
23+
docker-test:
24+
uses: ./.github/workflows/docker-test.yml
25+
with:
26+
release: ${{ inputs.release == 'true' }}
27+
28+
helm-chart-test:
29+
uses: ./.github/workflows/helm-chart-test.yml
30+
with:
31+
release: ${{ inputs.release == 'true' }}
32+
1833
build-and-test:
1934
name: Build & test Docker images with random user
2035
runs-on: ubuntu-latest
@@ -51,7 +66,7 @@ jobs:
5166
- name: Output branch name
5267
run: echo ${BRANCH}
5368
- name: Set Selenium base version
54-
if: contains(toJson(github.event.commits), '[deploy]') == false
69+
if: inputs.release != 'true'
5570
run: |
5671
make set_build_nightly
5772
cat .env | xargs -I {} echo {} >> $GITHUB_ENV

.github/workflows/deploy.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,27 @@ name: Deploys
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
release:
7+
description: 'Deploy a new release'
8+
required: false
9+
type: boolean
10+
default: false
511
push:
612
branches:
713
- trunk
814

915
jobs:
10-
deploy:
11-
# Only continue if the commit message has '[deploy]' in it
16+
build-test:
1217
if: contains(toJson(github.event.commits), '[deploy]') == true || github.event_name == 'workflow_dispatch'
18+
uses: ./.github/workflows/build-test.yml
19+
with:
20+
release: ${{ github.event.inputs.release == 'true' }}
21+
22+
deploy:
23+
needs:
24+
- build-test
25+
if: contains(toJson(github.event.commits), '[deploy]') || (github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'true')
1326
name: Deploy Docker images
1427
runs-on: ubuntu-latest
1528
permissions: write-all
@@ -118,8 +131,8 @@ jobs:
118131
uses: softprops/action-gh-release@master
119132
with:
120133
token: ${{ secrets.GITHUB_TOKEN }}
121-
tag_name: ${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}
122-
name: ${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}
134+
tag_name: "${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}"
135+
name: "${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}"
123136
body_path: "release_notes.md"
124137
generate_release_notes: true
125138
prerelease: ${{ env.PRERELEASE }}

.github/workflows/docker-test.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: Test Docker Selenium
2-
concurrency:
3-
group: ${{ github.workflow }}
42

53
on:
4+
workflow_call:
5+
inputs:
6+
release:
7+
description: 'Test a new release process'
8+
required: false
9+
type: boolean
10+
default: false
611
workflow_dispatch:
712
inputs:
813
request-timeout:
@@ -17,12 +22,6 @@ on:
1722
description: 'Test parameter for different log level'
1823
required: false
1924
default: 'INFO'
20-
push:
21-
paths-ignore:
22-
- '**.md'
23-
pull_request:
24-
paths-ignore:
25-
- '**.md'
2625

2726
permissions:
2827
contents: read
@@ -80,7 +79,7 @@ jobs:
8079
- name: Output branch name
8180
run: echo ${BRANCH}
8281
- name: Set Selenium base version
83-
if: contains(toJson(github.event.commits), '[deploy]') == false
82+
if: inputs.release != 'true'
8483
run: |
8584
make set_build_nightly
8685
cat .env | xargs -I {} echo {} >> $GITHUB_ENV

.github/workflows/helm-chart-release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,22 @@ on:
99
paths:
1010
- 'charts/selenium-grid/Chart.yaml'
1111
workflow_dispatch:
12+
inputs:
13+
release:
14+
description: 'Deploy a new release'
15+
required: false
16+
type: boolean
17+
default: false
1218

1319
jobs:
20+
helm-chart-test:
21+
uses: ./.github/workflows/helm-chart-test.yml
22+
with:
23+
release: ${{ github.event.inputs.release == 'true' }}
24+
1425
release:
26+
needs:
27+
- helm-chart-test
1528
runs-on: ubuntu-latest
1629
permissions: write-all
1730
steps:

.github/workflows/helm-chart-test.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name: Test Helm Charts
2-
concurrency:
3-
group: ${{ github.workflow }}
42

53
on:
6-
push:
7-
paths-ignore:
8-
- '**.md'
9-
pull_request:
10-
paths-ignore:
11-
- '**.md'
4+
workflow_call:
5+
inputs:
6+
release:
7+
description: 'Test a new release process'
8+
required: false
9+
type: boolean
10+
default: false
1211
workflow_dispatch:
1312
inputs:
1413
request-timeout:
@@ -107,7 +106,7 @@ jobs:
107106
- name: Output branch name
108107
run: echo ${BRANCH}
109108
- name: Set Selenium base version
110-
if: contains(toJson(github.event.commits), '[deploy]') == false
109+
if: inputs.release != 'true'
111110
run: |
112111
make set_build_nightly
113112
cat .env | xargs -I {} echo {} >> $GITHUB_ENV

.github/workflows/nightly.yaml renamed to .github/workflows/nightly.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ on:
55
- cron: '0 1 * * *'
66

77
jobs:
8-
docker-test:
8+
build-test:
99
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
10-
uses: ./.github/workflows/docker-test.yml
11-
12-
helm-chart-test:
13-
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
14-
uses: ./.github/workflows/helm-chart-test.yml
10+
uses: ./.github/workflows/build-test.yml
11+
with:
12+
release: false
1513

1614
deploy:
15+
needs:
16+
- build-test
1717
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
1818
name: Nightly build
1919
runs-on: ubuntu-latest

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
[![Build & test](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/build-test.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/build-test.yml)
2-
[![Test Docker Selenium](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/test-video.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/test-video.yml)
3-
[![Test Helm Charts](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/helm-chart-test.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/helm-chart-test.yml)
42
[![Deploys](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/deploy.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/deploy.yml)
53
[![Release Charts](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/helm-chart-release.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/helm-chart-release.yml)
6-
[![Nightly](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/nightly.yaml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/nightly.yaml)
4+
[![Nightly](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/nightly.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/nightly.yml)
75
[![Update Dev/Beta Browser Images](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/update-dev-beta-browser-images.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/update-dev-beta-browser-images.yml)
86

97
# Docker images for the Selenium Grid Server
@@ -55,6 +53,7 @@ Talk to us at https://www.selenium.dev/support/
5553
* [SE_OPTS Selenium Configuration Options](#se_opts-selenium-configuration-options)
5654
* [SE_JAVA_OPTS Java Environment Options](#se_java_opts-java-environment-options)
5755
* [Node configuration options](#node-configuration-options)
56+
* [Node configuration relay commands](#node-configuration-relay-commands)
5857
* [Setting Sub Path](#setting-sub-path)
5958
* [Setting Screen Resolution](#setting-screen-resolution)
6059
* [Grid Url and Session Timeout](#grid-url-and-session-timeout)

0 commit comments

Comments
 (0)