Skip to content

Commit

Permalink
chore: fix remove stale release check
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs authored Mar 15, 2023
1 parent 9018cbd commit 04a12d7
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/create-hotfix-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Check Stale Release Branches
id: stale-release-branches
run: |
branches_list=$(git branch -a | grep -e "origin/hotfix/" -e "origin/hotfix-release/" -e "origin/release/")
echo "Stales release branches list: $branches_list"
echo "branches_list=$branches_list" >> $GITHUB_OUTPUT
with:
fetch-depth: 1

- name: Setup Node
if: steps.stale-release-branches.outputs.branches_list == ''
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand All @@ -32,13 +26,11 @@ jobs:
# In order to make a commit, we need to initialize a user.
# You may choose to write something less generic here if you want, it doesn't matter functionality wise.
- name: Initialize Mandatory Git Config
if: steps.stale-release-branches.outputs.branches_list == ''
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: Generate Hotfix Branch Name
if: steps.stale-release-branches.outputs.branches_list == ''
id: generate-hotfix-branch-name
env:
HUSKY: 0
Expand All @@ -50,7 +42,6 @@ jobs:
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
- name: Create Hotfix Branch
if: steps.stale-release-branches.outputs.branches_list == ''
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 04a12d7

Please sign in to comment.