Skip to content

Commit 5ff7dbb

Browse files
authored
Merge pull request #830 from lidofinance/fix/ORC-548-dispatch-release-wf
Allow manual trigger of the release pipeline
2 parents b6e546b + c65b5fd commit 5ff7dbb

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/create-tag-and-trigger-deploy.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ on:
33
push:
44
branches:
55
- master
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: 'Tag version (e.g., 1.2.3)'
10+
required: true
11+
type: string
612

713
permissions:
814
contents: write
@@ -11,7 +17,8 @@ jobs:
1117
bump:
1218
name: Create tag and release
1319
runs-on: ubuntu-latest
14-
if: "contains(github.event.head_commit.message, 'chore(release)')"
20+
environment: release
21+
if: "contains(github.event.head_commit.message, 'chore(release)') || github.event_name == 'workflow_dispatch'"
1522
outputs:
1623
tag: ${{ steps.tag.outputs.tag }}
1724
steps:
@@ -22,7 +29,11 @@ jobs:
2229
- name: Get tag value
2330
id: tag
2431
run: |
25-
TAG="$(grep -oP '^chore\(release\).*\K(\d+\.\d+\.\d+)' <<< "$MESSAGE")"
32+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
33+
TAG="${{ inputs.tag }}"
34+
else
35+
TAG="$(grep -oP '^chore\(release\).*\K(\d+\.\d+\.\d+)' <<< "$MESSAGE")"
36+
fi
2637
echo "$TAG"
2738
echo "tag=$TAG" >> $GITHUB_OUTPUT
2839
env:
@@ -39,7 +50,8 @@ jobs:
3950
deploy-trigger:
4051
needs: bump
4152
name: Trigger build and PR creation in the infra-mainnet
42-
if: "contains(github.event.head_commit.message, 'chore(release)')"
53+
environment: release
54+
if: "contains(github.event.head_commit.message, 'chore(release)') || github.event_name == 'workflow_dispatch'"
4355
uses: ./.github/workflows/ci-prod.yml
4456
secrets: inherit
4557
with:

0 commit comments

Comments
 (0)