Skip to content

Commit e392b76

Browse files
committed
Fix update workflows for branch dispatch scripts
1 parent b82f8ad commit e392b76

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

.github/workflows/update-spring-cloud-azure-support-file.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ jobs:
2020
has_open_pr: ${{ steps.check.outputs.has_open_pr }}
2121
steps:
2222
- uses: actions/checkout@v4
23-
with:
24-
ref: main
2523
- name: Check for Existing Open Pull Request
2624
id: check
2725
uses: actions/github-script@v7
@@ -46,7 +44,6 @@ jobs:
4644
steps:
4745
- uses: actions/checkout@v4
4846
with:
49-
ref: main
5047
fetch-depth: 0
5148
- name: Generate Spring Cloud Azure Support File
5249
run: |
@@ -69,7 +66,8 @@ jobs:
6966
} >> "$GITHUB_ENV"
7067
- name: Make Decision Based on Git Diff
7168
run: |
72-
git checkout -b "${{ env.BRANCH_NAME }}"
69+
git fetch origin main
70+
git checkout -B "${{ env.BRANCH_NAME }}" origin/main
7371
if [[ -n "$(git status -s)" ]]; then
7472
echo "NEED_UPDATE_FILE=true" >> "$GITHUB_ENV"
7573
else

.github/workflows/update-spring-dependencies.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ jobs:
2020
skip_pipeline: ${{ steps.check_prs.outputs.skip_pipeline }}
2121
steps:
2222
- uses: actions/checkout@v4
23-
with:
24-
ref: main
2523
- name: Check for Open Spring Boot Upgrade PRs
2624
id: check_prs
2725
uses: actions/github-script@v7
@@ -46,7 +44,6 @@ jobs:
4644
steps:
4745
- uses: actions/checkout@v4
4846
with:
49-
ref: main
5047
fetch-depth: 0
5148
- name: Generate Version File
5249
run: |
@@ -74,7 +71,8 @@ jobs:
7471
run: |
7572
echo "Updating Spring Boot Dependencies Version: ${{ env.spring_boot_version }}"
7673
echo "Updating Spring Cloud Dependencies Version: ${{ env.spring_cloud_version }}"
77-
git checkout -b "${{ env.update_branch }}"
74+
git fetch origin main
75+
git checkout -B "${{ env.update_branch }}" origin/main
7876
pip install termcolor
7977
python ./sdk/spring/scripts/get_spring_boot_managed_external_dependencies.py -b "${{ env.spring_boot_version }}" -c "${{ env.spring_cloud_version }}"
8078
- name: Update external_dependencies.txt

0 commit comments

Comments
 (0)