Deploy specific Edge version #38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy specific Edge version | |
on: | |
workflow_dispatch: | |
inputs: | |
stable: | |
description: 'Use upstream stable build' | |
required: true | |
type: string | |
default: 'true' | |
reuse-base: | |
description: 'Reuse base image to build' | |
required: false | |
type: boolean | |
default: true | |
grid-version: | |
description: 'Grid version to build. E.g: 4.28.1. Must provide if reusing base image' | |
required: false | |
type: string | |
default: '' | |
build-date: | |
description: 'Build date in format YYYYMMDD. Must provide if reusing base image' | |
required: false | |
type: string | |
default: '20250909' | |
browser-name: | |
description: 'Browser name to build. E.g: edge' | |
required: true | |
type: string | |
default: 'edge' | |
browser-versions: | |
description: 'List browser version to build. E.g: [130, 131]' | |
required: true | |
default: '[95, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140]' | |
push-image: | |
description: 'Push image after testing successfully' | |
required: true | |
type: boolean | |
default: false | |
pr-changelog: | |
description: 'Create a PR for CHANGELOG' | |
required: true | |
type: boolean | |
default: true | |
env: | |
GRID_VERSION: ${{ github.event.inputs.grid-version }} | |
BROWSER_NAME: ${{ github.event.inputs.browser-name }} | |
REUSE_BASE: ${{ github.event.inputs.reuse-base || true }} | |
BUILD_DATE: ${{ github.event.inputs.build-date || '' }} | |
NAMESPACE: ${{ vars.DOCKER_NAMESPACE || 'selenium' }} | |
AUTHORS: ${{ vars.AUTHORS || 'SeleniumHQ' }} | |
PUSH_IMAGE: ${{ github.event.inputs.push-image || false }} | |
PR_CHANGELOG: ${{ github.event.inputs.pr-changelog || true }} | |
RUN_ID: ${{ github.run_id }} | |
jobs: | |
deploy: | |
name: Node/Standalone Edge | |
runs-on: ubuntu-24.04 | |
permissions: write-all | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
browser-version: ${{ fromJSON(github.event.inputs.browser-versions)}} | |
outputs: | |
GRID_VERSION: ${{ steps.display_grid_version.outputs.GRID_VERSION }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@main | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Set up containerd image store feature | |
uses: nick-invision/retry@master | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: | | |
make setup_dev_env | |
- name: Output Docker info | |
run: docker info | |
- name: Set Selenium base version | |
uses: ./.github/actions/get-latest-upstream | |
with: | |
release: ${{ github.event.inputs.stable || true }} | |
gh_cli_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Sets build date | |
run: | | |
if [ -z "${BUILD_DATE}" ]; then | |
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV | |
else | |
echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV | |
fi | |
echo "NAME=${NAMESPACE}" >> $GITHUB_ENV | |
echo "BROWSER_VERSION=${BROWSER_VERSION}" >> $GITHUB_ENV | |
env: | |
BROWSER_VERSION: ${{ matrix.browser-version }} | |
- name: Get Grid version | |
if: env.GRID_VERSION == '' | |
run: | | |
echo ${BASE_VERSION} | |
echo "GRID_VERSION=${BASE_VERSION}" >> $GITHUB_ENV | |
- name: Display Grid version | |
id: display_grid_version | |
run: | | |
echo ${GRID_VERSION} | |
echo "GRID_VERSION=${GRID_VERSION}" >> "$GITHUB_OUTPUT" | |
- name: Login Docker Hub | |
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" | |
env: | |
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
- name: Build images with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }} | |
uses: nick-invision/retry@master | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
retry_wait_seconds: 60 | |
command: | | |
make update_browser_versions_matrix | |
./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE} | |
cat .env | xargs -I {} echo {} >> $GITHUB_ENV | |
- name: Build Hub image for testing | |
if: env.REUSE_BASE == 'false' | |
run: make hub | |
- name: Test images Node with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }} | |
uses: nick-invision/retry@master | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
retry_wait_seconds: 60 | |
command: | | |
make test_edge | |
- name: Test images Standalone with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }} | |
uses: nick-invision/retry@master | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
retry_wait_seconds: 60 | |
command: | | |
make test_edge_standalone \ | |
&& make test_edge_standalone_java | |
- name: Push images with Grid core ${{ env.GRID_VERSION }} and ${{ env.BROWSER_NAME }} v${{ env.BROWSER_VERSION }} | |
if: env.PUSH_IMAGE == 'true' | |
run: | | |
./tests/build-backward-compatible/bootstrap.sh ${GRID_VERSION} ${BROWSER_VERSION} ${BROWSER_NAME} ${REUSE_BASE} true true | |
- name: Upload changelog | |
if: always() | |
uses: actions/upload-artifact@main | |
with: | |
name: image_tags_${{ env.GRID_VERSION }}_${{ env.BROWSER_NAME }}_${{ env.BROWSER_VERSION }} | |
path: ./CHANGELOG/${{ env.GRID_VERSION }}/${{ env.BROWSER_NAME }}_${{ env.BROWSER_VERSION }}.md | |
if-no-files-found: ignore | |
pr-results: | |
if: (!failure() && !cancelled() && (github.event.inputs.pr-changelog == 'true')) | |
uses: ./.github/workflows/create-changelog-pr.yml | |
needs: deploy | |
with: | |
grid-version: ${{ needs.deploy.outputs.GRID_VERSION }} | |
browser-name: ${{ github.event.inputs.browser-name }} | |
browser-versions: ${{ github.event.inputs.browser-versions }} | |
run-id: ${{ github.run_id }} | |
secrets: inherit |