-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: Cut RC Branch | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
cut-rc: | ||
name: Cut RC branch | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout Branch | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
ref: main | ||
|
||
- name: Check if RC branch exists | ||
run: | | ||
remote_rc_branch_check=$(git ls-remote --heads origin rc | wc -l) | ||
if [[ "${remote_rc_branch_check}" -gt 0 ]]; then | ||
echo "Remote RC branch exists." | ||
echo "Please delete current RC branch before running again." | ||
exit 1 | ||
fi | ||
- name: Cut RC branch | ||
run: | | ||
git switch --quiet --create rc | ||
git push --quiet --set-upstream origin rc |
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