Docker: Improve the video recording container graceful shutdown #2555
Workflow file for this run
This file contains 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: Build & test | |
on: | |
workflow_call: | |
inputs: | |
release: | |
description: 'Test a new release process' | |
required: false | |
type: string | |
default: 'false' | |
workflow_dispatch: | |
inputs: | |
rerunFailedOnly: | |
description: 'Rerun only failed jobs' | |
required: false | |
type: boolean | |
default: true | |
push: | |
branches: | |
- trunk | |
paths-ignore: | |
- '**.md' | |
- '.*' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref == github.ref_protected && github.run_id || github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: write-all | |
env: | |
GH_CLI_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_CLI_TOKEN_PR: ${{ secrets.SELENIUM_CI_TOKEN || secrets.GITHUB_TOKEN }} | |
RUN_ID: ${{ github.run_id }} | |
RERUN_FAILED_ONLY: ${{ github.event.inputs.rerunFailedOnly || true }} | |
RUN_ATTEMPT: ${{ github.run_attempt }} | |
jobs: | |
docker-test: | |
name: Test Seleium Grid on Docker | |
uses: ./.github/workflows/docker-test.yml | |
with: | |
release: ${{ inputs.release == 'true' }} | |
helm-chart-test: | |
name: Test Selenium Grid on Kubernetes | |
uses: ./.github/workflows/helm-chart-test.yml | |
secrets: inherit | |
with: | |
release: ${{ inputs.release == 'true' }} | |
rerun-workflow-when-failure: | |
name: Rerun workflow when failure | |
needs: | |
- docker-test | |
- helm-chart-test | |
if: failure() && ( github.run_attempt < 3 ) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@main | |
- name: Install GitHub CLI | |
run: | | |
sudo apt update | |
sudo apt install gh | |
- name: Authenticate GitHub CLI for PR | |
if: github.event_name == 'pull_request' | |
run: | | |
echo "$GH_CLI_TOKEN_PR" | gh auth login --with-token | |
- name: Authenticate GitHub CLI | |
if: github.event_name != 'pull_request' | |
run: | | |
echo "$GH_CLI_TOKEN" | gh auth login --with-token | |
- name: Rerun workflow when failure | |
run: | | |
echo "Rerun workflow ID $RUN_ID in attempt #$(($RUN_ATTEMPT + 1))" | |
gh workflow run rerun-failed.yml \ | |
--repo $GITHUB_REPOSITORY \ | |
--raw-field runId=$RUN_ID \ | |
--raw-field rerunFailedOnly=$RERUN_FAILED_ONLY |