diff --git a/.github/workflows/move-to-main-repo.yaml b/.github/workflows/move-to-main-repo.yaml index dd1a925..287208e 100644 --- a/.github/workflows/move-to-main-repo.yaml +++ b/.github/workflows/move-to-main-repo.yaml @@ -83,12 +83,10 @@ jobs: commit_message="Add script files for $script_name" - git remote add upstream https://github.com/${target_repo}.git - git fetch upstream - git checkout -b "$branch_name" upstream/main + git checkout -b "$branch_name" git status @@ -103,6 +101,10 @@ jobs: git push origin "$branch_name" + git remote add upstream https://github.com/${target_repo}.git + + git fetch upstream + git status echo ${{ secrets.MAIN_REPO_WF }} > mytoken.txt