Skip to content

Commit 7fe8c38

Browse files
chefgsCopilotCopilot
authored
Enable manual triggering of release workflow (#61)
* Enable manual triggering of release workflow Added workflow_dispatch event to allow manual triggering with branch input. * Update .github/workflows/release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix: use inputs.branch in checkout and guard head_commit.message for workflow_dispatch Agent-Logs-Url: https://github.com/cloudengine-labs/devops_os/sessions/173bdd11-b657-4dcd-8aa5-d0306d8fc88d Co-authored-by: chefgs <7605658+chefgs@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 2329775 commit 7fe8c38

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: Release — Version Bump & Publish
22

3-
# Runs on every direct push to main (human or PR merge).
4-
# Bot-authored commits are skipped to prevent infinite loops.
3+
# Manually triggered release workflow (via "Run workflow" in GitHub Actions).
4+
# Use the `branch` input to select the source branch for the release (defaults to `main`).
55
on:
6-
push:
7-
branches: [main]
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: 'Default Branch Name'
10+
required: true
11+
default: 'main'
812

913
permissions:
1014
contents: write # needed to push the release branch and create tags
@@ -22,16 +26,17 @@ jobs:
2226
# references the release/vX.Y.Z branch name.
2327
if: >-
2428
github.actor != 'github-actions[bot]' &&
25-
!contains(github.event.head_commit.message, '[skip ci]') &&
26-
!(startsWith(github.event.head_commit.message, 'Merge pull request') &&
27-
contains(github.event.head_commit.message, 'release/v'))
29+
!contains(github.event.head_commit.message || '', '[skip ci]') &&
30+
!(startsWith(github.event.head_commit.message || '', 'Merge pull request') &&
31+
contains(github.event.head_commit.message || '', 'release/v'))
2832
2933
steps:
3034
- name: Checkout repository (full history for tagging)
3135
uses: actions/checkout@v4
3236
with:
3337
token: ${{ secrets.GITHUB_TOKEN }}
3438
fetch-depth: 0
39+
ref: ${{ inputs.branch }}
3540

3641
- name: Set up Python
3742
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)