Create New Hotfix Branch #4
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: Create New Hotfix Branch | |
on: | |
workflow_dispatch: | |
inputs: | |
hotfix_name: | |
description: Hotfix branch name | |
required: true | |
jobs: | |
create-branch: | |
name: Create New Hotfix Branch | |
runs-on: ubuntu-latest | |
# Only allow these users to create new hotfix branch from 'main' | |
if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'utsabc' || github.actor == 'shrouti1507') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'utsabc') | |
steps: | |
- name: Create Branch | |
uses: peterjgrainger/action-create-branch@v2.4.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} | |
with: | |
branch: 'hotfix/${{ inputs.hotfix_name }}' |