diff --git a/.github/workflows/create_daily_oss_agent_shin_branch.yml b/.github/workflows/create_daily_oss_agent_shin_branch.yml index d6118f3b53c..187eeb2ae33 100644 --- a/.github/workflows/create_daily_oss_agent_shin_branch.yml +++ b/.github/workflows/create_daily_oss_agent_shin_branch.yml @@ -41,7 +41,7 @@ jobs: echo "Creating new branch: $BRANCH_NAME" # Create the new branch from main git checkout -b $BRANCH_NAME origin/main - # Push the new branch - git push origin $BRANCH_NAME + # Push the new branch using the workflow token since persist-credentials: false + git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$BRANCH_NAME" echo "Successfully created and pushed branch: $BRANCH_NAME" fi diff --git a/.github/workflows/create_daily_staging_branch.yml b/.github/workflows/create_daily_staging_branch.yml index 424d8de0a41..dc224bb204c 100644 --- a/.github/workflows/create_daily_staging_branch.yml +++ b/.github/workflows/create_daily_staging_branch.yml @@ -41,8 +41,8 @@ jobs: echo "Creating new branch: $BRANCH_NAME" # Create the new branch from main git checkout -b $BRANCH_NAME origin/main - # Push the new branch - git push origin $BRANCH_NAME + # Push the new branch using the workflow token since persist-credentials: false + git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$BRANCH_NAME" echo "Successfully created and pushed branch: $BRANCH_NAME" fi @@ -81,7 +81,7 @@ jobs: echo "Creating new branch: $BRANCH_NAME" # Create the new branch from main git checkout -b $BRANCH_NAME origin/main - # Push the new branch - git push origin $BRANCH_NAME + # Push the new branch using the workflow token since persist-credentials: false + git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$BRANCH_NAME" echo "Successfully created and pushed branch: $BRANCH_NAME" fi