diff --git a/.github/workflows/cd-beta.yaml b/.github/workflows/cd-beta.yaml index 3c50ef05c..93407a357 100644 --- a/.github/workflows/cd-beta.yaml +++ b/.github/workflows/cd-beta.yaml @@ -97,9 +97,12 @@ jobs: - name: Checkout Repo uses: actions/checkout@v4 + - name: Retrive latest branches + uses: git fetch origin + - name: Get origin branch list run: | - echo "origin_branch_list=$(git branch -r --list origin/stable)" >> "$GITHUB_ENV" + echo "origin_branch_list=$(git branch -r --list origin/stable | xargs)" >> "$GITHUB_ENV" - name: Ensure origin/stable branch exists if: env.origin_branch_list != 'origin/stable' diff --git a/.github/workflows/cd-dev.yaml b/.github/workflows/cd-dev.yaml index 8341a78c7..032b5e23b 100644 --- a/.github/workflows/cd-dev.yaml +++ b/.github/workflows/cd-dev.yaml @@ -79,9 +79,12 @@ jobs: - name: Checkout Repo uses: actions/checkout@v4 + - name: Retrive latest branches + uses: git fetch origin + - name: Get origin branch list run: | - echo "origin_branch_list=$(git branch -r --list origin/stage)" >> "$GITHUB_ENV" + echo "origin_branch_list=$(git branch -r --list origin/stage | xargs)" >> "$GITHUB_ENV" - name: Ensure origin/stage branch exists if: env.origin_branch_list != 'origin/stage' diff --git a/.github/workflows/cd-stable.yaml b/.github/workflows/cd-stable.yaml index eb4b15fc1..0ccea3292 100644 --- a/.github/workflows/cd-stable.yaml +++ b/.github/workflows/cd-stable.yaml @@ -51,6 +51,8 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Retrive latest branches + uses: git fetch origin - name: Switch branch to stable run: git checkout stable - name: Get commit short hash diff --git a/.github/workflows/cd-stage.yaml b/.github/workflows/cd-stage.yaml index b6019db6a..8e6dd4b55 100644 --- a/.github/workflows/cd-stage.yaml +++ b/.github/workflows/cd-stage.yaml @@ -87,9 +87,12 @@ jobs: - name: Checkout Repo uses: actions/checkout@v4 + - name: Retrive latest branches + uses: git fetch origin + - name: Get origin branch list run: | - echo "origin_branch_list=$(git branch -r --list origin/beta)" >> "$GITHUB_ENV" + echo "origin_branch_list=$(git branch -r --list origin/beta | xargs)" >> "$GITHUB_ENV" - name: Ensure origin/beta branch exists if: env.origin_branch_list != 'origin/beta'