Skip to content

[Bug] - Gitflow Workflow PR Rename Check #22

[Bug] - Gitflow Workflow PR Rename Check

[Bug] - Gitflow Workflow PR Rename Check #22

Workflow file for this run

name: Gitflow Release
on:
workflow_dispatch:
inputs:
version_increment:
type: choice
required: true
description: "Version increment"
default: "patch"
options:
- "major"
- "minor"
- "patch"
pull_request:
types:
- closed
jobs:
gitflow-release:
name: Gitflow Release
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: gitflow-workflow-action release workflows
id: gitflow
uses: hoangvvo/[email protected]
with:
develop_branch: "develop"
main_branch: "production"
merge_back_from_main: true
version_increment: ${{ inputs.version_increment }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install GitHub CLI
run: brew install gh
- name: Update pull request title
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
PR_NUMBER="${{ steps.gitflow.outputs.pull_number }}"
VERSION=$(echo "${{ steps.gitflow.outputs.version }}" | sed 's/^v//')
gh pr edit $PR_NUMBER --title "[Release] - $VERSION"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}