diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e2258b64..22f3d4fa1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,9 @@ name: CI on: pull_request: - branches: [ develop ] + branches: + - develop + - 'release/*' workflow_dispatch: concurrency: @@ -27,9 +29,11 @@ jobs: REPO="https://github.com/${{ github.repository }}.git" FULL_REPO="${{ github.repository }}" REPO_NAME="${FULL_REPO##*/}" + BASE_BRANCH="${{ github.base_ref }}" # Clean the repository directory before starting docker run --rm --net=host -v $(pwd):/workspace -w /workspace \ -e "REPO_NAME=${REPO_NAME}" \ + -e "BASE_BRANCH=${BASE_BRANCH}" \ ${docker_image} /bin/bash -c ' if [ -d ${REPO_NAME} ]; then echo "Directory ${REPO_NAME} exists, removing it..." @@ -38,7 +42,7 @@ jobs: ' git config --global user.name "FastDeployCI" git config --global user.email "fastdeploy_ci@example.com" - git clone ${REPO} ${REPO_NAME} + git clone ${REPO} ${REPO_NAME} -b ${BASE_BRANCH} cd FastDeploy if [ "${{ github.event_name }}" = "pull_request" ]; then git fetch origin pull/${{ github.event.pull_request.number }}/head:pr/${{ github.event.pull_request.number }} diff --git a/.github/workflows/ci_xpu.yml b/.github/workflows/ci_xpu.yml index d47adbd6e..e87136704 100644 --- a/.github/workflows/ci_xpu.yml +++ b/.github/workflows/ci_xpu.yml @@ -2,7 +2,9 @@ name: CI_XPU on: pull_request: - branches: [ develop ] + branches: + - develop + - 'release/*' workflow_dispatch: concurrency: @@ -27,9 +29,11 @@ jobs: REPO="https://github.com/${{ github.repository }}.git" FULL_REPO="${{ github.repository }}" REPO_NAME="${FULL_REPO##*/}" + BASE_BRANCH="${{ github.base_ref }}" # Clean the repository directory before starting docker run --rm --net=host -v $(pwd):/workspace -w /workspace \ -e "REPO_NAME=${REPO_NAME}" \ + -e "BASE_BRANCH=${BASE_BRANCH}" \ ${docker_image} /bin/bash -c ' if [ -d ${REPO_NAME} ]; then echo "Directory ${REPO_NAME} exists, removing it..." @@ -38,7 +42,7 @@ jobs: ' git config --global user.name "FastDeployCI" git config --global user.email "fastdeploy_ci@example.com" - git clone ${REPO} ${REPO_NAME} + git clone ${REPO} ${REPO_NAME} -b ${BASE_BRANCH} cd FastDeploy if [ "${{ github.event_name }}" = "pull_request" ]; then git fetch origin pull/${{ github.event.pull_request.number }}/head:pr/${{ github.event.pull_request.number }}