From 02cbe5db3d04b1aff9b6d99f8028400193ab8c2f Mon Sep 17 00:00:00 2001 From: Dave Bartolomeo Date: Fri, 10 Jan 2025 12:15:12 -0500 Subject: [PATCH] Fix `sync-codeql-cli.yml` issues on latest runners (#53846) Co-authored-by: docs-bot <77750099+docs-bot@users.noreply.github.com> --- .github/workflows/generate-code-scanning-query-lists.yml | 2 +- .github/workflows/sync-codeql-cli.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate-code-scanning-query-lists.yml b/.github/workflows/generate-code-scanning-query-lists.yml index 505550449ffc..7fcbc2bc31c9 100644 --- a/.github/workflows/generate-code-scanning-query-lists.yml +++ b/.github/workflows/generate-code-scanning-query-lists.yml @@ -146,7 +146,7 @@ jobs: git add data/reusables/code-scanning/codeql-query-tables git commit -m "Update CodeQL query tables" - git push origin $branchname + git push -u origin $branchname echo "Creating pull request..." gh pr create \ diff --git a/.github/workflows/sync-codeql-cli.yml b/.github/workflows/sync-codeql-cli.yml index e42d6207406c..a4b3e550b094 100644 --- a/.github/workflows/sync-codeql-cli.yml +++ b/.github/workflows/sync-codeql-cli.yml @@ -91,13 +91,13 @@ jobs: branchname=codeql-cli-update-${{ steps.semmle-code.outputs.OPENAPI_COMMIT_SHA }} branchCheckout=$(git checkout -b $branchname) - if [[! $? -eq 0 ]]; then + if [[ ! $? -eq 0 ]]; then echo "Branch $branchname already exists in `github/docs-internal`. Exiting..." exit 0 fi git add . git commit -m "Update CodeQL CLI data" - git push origin $branchname + git push -u origin $branchname echo "Creating pull request..." gh pr create \