Skip to content

Commit f3837c4

Browse files
committed
Single-commit force-push and fix concurrency for update-manifest
Use a fixed concurrency group (workflow name only, no github.ref) so all update-manifest runs serialize regardless of trigger source. Revert to git switch -C from main + force-push so the PR branch always has exactly one commit with the full manifest diff against main.
1 parent 46ca7d8 commit f3837c4

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

.github/workflows/update-manifest.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defaults:
1414
shell: bash --noprofile --norc -euxo pipefail {0}
1515

1616
concurrency:
17-
group: ${{ github.workflow }}-${{ github.ref }}
17+
group: ${{ github.workflow }}
1818
cancel-in-progress: false
1919

2020
jobs:
@@ -41,31 +41,22 @@ jobs:
4141
git config user.name 'github-actions[bot]'
4242
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
4343
44-
- name: Switch to PR branch
44+
- name: Regenerate manifest and push
4545
run: |
46-
if git ls-remote --exit-code --heads origin "$PR_BRANCH" >/dev/null; then
47-
git fetch origin "$PR_BRANCH"
48-
git switch -c "$PR_BRANCH" "origin/$PR_BRANCH"
49-
else
50-
git switch -C "$PR_BRANCH"
51-
fi
46+
git switch -C "$PR_BRANCH"
47+
python .github/scripts/update-manifest.py
5248
53-
- name: Regenerate manifest
54-
run: python .github/scripts/update-manifest.py
55-
56-
- name: Commit and push (if changed)
57-
run: |
5849
if git diff --quiet -- versions-manifest.json; then
5950
echo "No manifest changes"
6051
exit 0
6152
fi
6253
6354
git add versions-manifest.json
6455
git commit -m "Update versions-manifest.json"
65-
git push origin "$PR_BRANCH"
56+
git push --force origin "$PR_BRANCH"
6657
6758
if gh pr list --repo "$GITHUB_REPOSITORY" --head "$PR_BRANCH" --state open --json number -q '.[].number' | grep -q .; then
68-
echo "Existing PR updated"
59+
echo "Existing PR updated via force-push"
6960
else
7061
gh pr create --repo "$GITHUB_REPOSITORY" \
7162
--base main \

0 commit comments

Comments
 (0)