From b4999866fa8d407e92abb929e1a995804f31cfe1 Mon Sep 17 00:00:00 2001 From: Vince Grassia <593223+vgrassia@users.noreply.github.com> Date: Mon, 18 Dec 2023 12:59:26 -0500 Subject: [PATCH] Merge _cut_rc.yml into version-bump.yml (#7264) --- .github/workflows/_cut_rc.yml | 29 ----------------------------- .github/workflows/version-bump.yml | 26 ++++++++++++++++++++++---- 2 files changed, 22 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/_cut_rc.yml diff --git a/.github/workflows/_cut_rc.yml b/.github/workflows/_cut_rc.yml deleted file mode 100644 index d869a3dc0d..0000000000 --- a/.github/workflows/_cut_rc.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -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 diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index cfdc3370be..6a9d492d42 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -295,8 +295,26 @@ jobs: run: gh pr merge $PR_NUMBER --squash --auto --delete-branch cut_rc: - name: Cut RC Branch - if: ${{ inputs.cut_rc_branch == true }} + name: Cut RC branch needs: bump_version - uses: ./.github/workflows/_cut_rc.yml - secrets: inherit + if: ${{ inputs.cut_rc_branch == true }} + 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