From d195931f642e0e956a27c33538db1de8efa0d15a Mon Sep 17 00:00:00 2001 From: Yuanhao Ji Date: Mon, 29 Apr 2024 15:38:01 +0800 Subject: [PATCH] ci: pushd should out of loop --- .github/actions/fetch-and-rebase/action.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/actions/fetch-and-rebase/action.yml b/.github/actions/fetch-and-rebase/action.yml index fa72a6a67bd..f2ff067e3d3 100644 --- a/.github/actions/fetch-and-rebase/action.yml +++ b/.github/actions/fetch-and-rebase/action.yml @@ -21,6 +21,7 @@ runs: REPO_PATH: ${{ inputs.repo_path }} REMOTE_BRANCH: ${{ inputs.remote_branch }} LOOP: ${{ inputs.loop }} + working-directory: ${{ inputs.repo_path }} shell: bash run: | set +e @@ -29,7 +30,6 @@ runs: for i in $(seq 1 ${LOOP}) do - pushd ${REPO_PATH} && git fetch --all && git rebase ${REMOTE_BRANCH} && git submodule sync && @@ -37,8 +37,7 @@ runs: git reset --hard HEAD && git clean -dfx && git submodule foreach git reset --hard HEAD && - git submodule foreach git clean -dfx && - popd + git submodule foreach git clean -dfx if [[ $? -ne 0 ]] then -- Gitee