diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 438bf8278..23bcea7db 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,8 +1,13 @@ name: Build & test -concurrency: - group: ${{ github.workflow }} on: + workflow_call: + inputs: + release: + description: 'Test a new release process' + required: false + type: boolean + default: false workflow_dispatch: push: paths-ignore: @@ -15,6 +20,16 @@ permissions: contents: read jobs: + docker-test: + uses: ./.github/workflows/docker-test.yml + with: + release: ${{ inputs.release == 'true' }} + + helm-chart-test: + uses: ./.github/workflows/helm-chart-test.yml + with: + release: ${{ inputs.release == 'true' }} + build-and-test: name: Build & test Docker images with random user runs-on: ubuntu-latest @@ -51,7 +66,7 @@ jobs: - name: Output branch name run: echo ${BRANCH} - name: Set Selenium base version - if: contains(toJson(github.event.commits), '[deploy]') == false + if: inputs.release != 'true' run: | make set_build_nightly cat .env | xargs -I {} echo {} >> $GITHUB_ENV diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e19b8f205..2ee933623 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,14 +2,27 @@ name: Deploys on: workflow_dispatch: + inputs: + release: + description: 'Deploy a new release' + required: false + type: boolean + default: false push: branches: - trunk jobs: - deploy: - # Only continue if the commit message has '[deploy]' in it + build-test: if: contains(toJson(github.event.commits), '[deploy]') == true || github.event_name == 'workflow_dispatch' + uses: ./.github/workflows/build-test.yml + with: + release: ${{ github.event.inputs.release == 'true' }} + + deploy: + needs: + - build-test + if: contains(toJson(github.event.commits), '[deploy]') || (github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'true') name: Deploy Docker images runs-on: ubuntu-latest permissions: write-all @@ -118,8 +131,8 @@ jobs: uses: softprops/action-gh-release@master with: token: ${{ secrets.GITHUB_TOKEN }} - tag_name: ${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }} - name: ${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }} + tag_name: "${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}" + name: "${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}" body_path: "release_notes.md" generate_release_notes: true prerelease: ${{ env.PRERELEASE }} diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index 15c0febc8..6debee93d 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -1,8 +1,13 @@ name: Test Docker Selenium -concurrency: - group: ${{ github.workflow }} on: + workflow_call: + inputs: + release: + description: 'Test a new release process' + required: false + type: boolean + default: false workflow_dispatch: inputs: request-timeout: @@ -17,12 +22,6 @@ on: description: 'Test parameter for different log level' required: false default: 'INFO' - push: - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' permissions: contents: read @@ -80,7 +79,7 @@ jobs: - name: Output branch name run: echo ${BRANCH} - name: Set Selenium base version - if: contains(toJson(github.event.commits), '[deploy]') == false + if: inputs.release != 'true' run: | make set_build_nightly cat .env | xargs -I {} echo {} >> $GITHUB_ENV diff --git a/.github/workflows/helm-chart-release.yml b/.github/workflows/helm-chart-release.yml index bd7dd13a3..3387191f8 100644 --- a/.github/workflows/helm-chart-release.yml +++ b/.github/workflows/helm-chart-release.yml @@ -9,9 +9,22 @@ on: paths: - 'charts/selenium-grid/Chart.yaml' workflow_dispatch: + inputs: + release: + description: 'Deploy a new release' + required: false + type: boolean + default: false jobs: + helm-chart-test: + uses: ./.github/workflows/helm-chart-test.yml + with: + release: ${{ github.event.inputs.release == 'true' }} + release: + needs: + - helm-chart-test runs-on: ubuntu-latest permissions: write-all steps: diff --git a/.github/workflows/helm-chart-test.yml b/.github/workflows/helm-chart-test.yml index 7d15e4917..43fe18e22 100644 --- a/.github/workflows/helm-chart-test.yml +++ b/.github/workflows/helm-chart-test.yml @@ -1,14 +1,13 @@ name: Test Helm Charts -concurrency: - group: ${{ github.workflow }} on: - push: - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' + workflow_call: + inputs: + release: + description: 'Test a new release process' + required: false + type: boolean + default: false workflow_dispatch: inputs: request-timeout: @@ -107,7 +106,7 @@ jobs: - name: Output branch name run: echo ${BRANCH} - name: Set Selenium base version - if: contains(toJson(github.event.commits), '[deploy]') == false + if: inputs.release != 'true' run: | make set_build_nightly cat .env | xargs -I {} echo {} >> $GITHUB_ENV diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yml similarity index 95% rename from .github/workflows/nightly.yaml rename to .github/workflows/nightly.yml index caa816a90..15467c42e 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yml @@ -5,15 +5,15 @@ on: - cron: '0 1 * * *' jobs: - docker-test: + build-test: if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - uses: ./.github/workflows/docker-test.yml - - helm-chart-test: - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - uses: ./.github/workflows/helm-chart-test.yml + uses: ./.github/workflows/build-test.yml + with: + release: false deploy: + needs: + - build-test if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' name: Nightly build runs-on: ubuntu-latest diff --git a/README.md b/README.md index 4a2bf4a5b..07cdc1501 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@ [![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) -[![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) -[![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) [![Deploys](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/deploy.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/deploy.yml) [![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) -[![Nightly](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/nightly.yaml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/nightly.yaml) +[![Nightly](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/nightly.yml/badge.svg)](https://github.com/SeleniumHQ/docker-selenium/actions/workflows/nightly.yml) [![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) # Docker images for the Selenium Grid Server @@ -55,6 +53,7 @@ Talk to us at https://www.selenium.dev/support/ * [SE_OPTS Selenium Configuration Options](#se_opts-selenium-configuration-options) * [SE_JAVA_OPTS Java Environment Options](#se_java_opts-java-environment-options) * [Node configuration options](#node-configuration-options) + * [Node configuration relay commands](#node-configuration-relay-commands) * [Setting Sub Path](#setting-sub-path) * [Setting Screen Resolution](#setting-screen-resolution) * [Grid Url and Session Timeout](#grid-url-and-session-timeout)