From 54d83558d1c39c5a45361430449d7745c21cc8c5 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Thu, 19 Sep 2024 18:50:52 +0200 Subject: [PATCH] [ci] Enabling workflow to be triggered manually [skip ci] --- .github/workflows/stage-release.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/stage-release.yml b/.github/workflows/stage-release.yml index 6fef60cd7d0b3..80120022f59ba 100644 --- a/.github/workflows/stage-release.yml +++ b/.github/workflows/stage-release.yml @@ -3,6 +3,11 @@ name: Release Staging on: pull_request: types: [ closed ] + workflow_dispatch: + inputs: + version: + description: 'Selenium version to release' + required: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -11,18 +16,26 @@ env: jobs: github-release: if: > - github.event.pull_request.merged == true && + (github.event.pull_request.merged == true && github.repository_owner == 'seleniumhq' && - startsWith(github.event.pull_request.head.ref, 'release-preparation-') + startsWith(github.event.pull_request.head.ref, 'release-preparation-')) || + (github.event_name == 'workflow_dispatch' && + github.event.inputs.version != '' && + github.repository_owner == 'seleniumhq') runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v4 - name: Extract version from branch name - id: extract_version + if: github.event.pull_request.merged == true run: | VERSION=$(echo $BRANCH_NAME | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Extract version from workflow input + if: github.event_name == 'workflow_dispatch' + run: | + VERSION=${{ inputs.version }} + echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Prep git run: | git config --local user.email "selenium-ci@users.noreply.github.com"