diff --git a/.github/workflows/beam_Upgrade_GCP_BOM.yml b/.github/workflows/beam_Upgrade_GCP_BOM.yml index 480fb5230956..9cbf5bf49513 100644 --- a/.github/workflows/beam_Upgrade_GCP_BOM.yml +++ b/.github/workflows/beam_Upgrade_GCP_BOM.yml @@ -81,10 +81,10 @@ jobs: branchName=upgrade_gcp_bom_${LATEST_VER//./_} git checkout -b $branchName git add -A - git diff-index --quiet HEAD || gitdiff=$? || echo $? - if [[ $gitDiff != 0 ]]; then + if ! git diff --cached --quiet; then echo "Changes are ready to commit" git commit -m "Upgrade GCP Libraries BOM to ${LATEST_VER}" --quiet + gh auth setup-git git push origin $branchName --quiet PR_BODY="This PR was created by automation. It upgrades the Google Cloud Platform Libraries BOM from **${CURRENT_VER}** to **${LATEST_VER}** and updates Netty, gRPC, Arrow, Gax, Protobuf, and OpenTelemetry versions to match. diff --git a/.github/workflows/update_python_dependencies.yml b/.github/workflows/update_python_dependencies.yml index 54b8c72af99d..24cab2662bb7 100644 --- a/.github/workflows/update_python_dependencies.yml +++ b/.github/workflows/update_python_dependencies.yml @@ -96,10 +96,10 @@ jobs: branchName=weekly_update_python_dependencies_$(date +%s) git checkout -b $branchName git add -A - git diff-index --quiet HEAD || gitdiff=$? || echo $? - if [[ $gitDiff != 0 ]]; then + if ! git diff --cached --quiet; then echo "Changes are ready to commit" git commit -m "Update Python Dependencies" --quiet + gh auth setup-git git push origin $branchName --quiet GITHUB_PR_URL=$(gh pr create --title "Update Python Dependencies" --label "python" --body "This PR was created by automation - by default this does not execute tests due to a limitation in GitHub Actions. To review this PR, please (1) review the contents to make sure all dependency upgrades are formatted correctly, (2) close and reopen the PR (3) Approve/merge if tests pass successfully.") echo "Link of the new PR $GITHUB_PR_URL"