From d2eadbffad94347a2fa806befbaf55ee1b1c4acb Mon Sep 17 00:00:00 2001 From: dilanbhalla <35575727+dilanbhalla@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:07:41 -0700 Subject: [PATCH] Update sync-main.yml --- .github/workflows/sync-main.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sync-main.yml b/.github/workflows/sync-main.yml index 30b67092d08..fe523763268 100644 --- a/.github/workflows/sync-main.yml +++ b/.github/workflows/sync-main.yml @@ -11,7 +11,6 @@ on: - cron: '55 * * * *' jobs: - sync-main: name: Sync-main runs-on: ubuntu-latest @@ -31,25 +30,28 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git checkout -B sync-main-pr origin/sync-main-pr - - echo "::group::Fetch" + - name: Sync origin/main + shell: bash + run: | + echo "::group::Sync with main branch" git pull origin sync-main-pr; exitCode=$?; if [ $exitCode -ne 0 ]; then exitCode=0; fi - # git config pull.rebase true git pull origin main git push --force origin sync-main-pr echo "::endgroup::" - + - name: Sync upstream/codeql-cli/latest + shell: bash + run: | echo "::group::Set up remote" git remote add upstream https://github.com/github/codeql.git git fetch upstream --tags --force echo "::endgroup::" - echo "::group::Checkout and merge" + echo "::group::Merge codeql-cli/latest" set -x git merge codeql-cli/latest set +x echo "::endgroup::" - - name: Push sync branch and ensure visibility + - name: Push sync branch run: | git push origin sync-main-pr env: