Skip to content

Commit 1cc1c76

Browse files
committed
ci: run download-hashes on beta branch
1 parent 35f88da commit 1cc1c76

1 file changed

Lines changed: 4 additions & 19 deletions

File tree

.github/workflows/download-hashes.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ jobs:
331331
with:
332332
node-version: "22"
333333

334-
- uses: pnpm/action-setup@v4
334+
- uses: pnpm/action-setup@v6
335335

336336
- name: Install dependencies
337337
run: |
@@ -407,7 +407,7 @@ jobs:
407407
- name: Create pull request
408408
env:
409409
GH_TOKEN: ${{ github.token }}
410-
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
410+
BASE_BRANCH: beta
411411
run: |
412412
set -euo pipefail
413413
@@ -419,17 +419,10 @@ jobs:
419419
420420
PREFIX="actions/core-downloads-"
421421
422-
# List existing core.json update PRs
423-
prs=$(gh pr list \
424-
--state open \
425-
--base "$DEFAULT_BRANCH" \
426-
--json number,headRefName \
427-
--jq '.[] | select(.headRefName | startswith("'"$PREFIX"'")) | .number')
428-
429422
version_gui="${{ needs.validate-download-hashes.outputs.version_gui }}"
430423
version_cli="${{ needs.validate-download-hashes.outputs.version_cli }}"
431424
432-
BRANCH_NAME="${PREFIX}${version_cli}-$(date +%Y%m%d%H%M%S)"
425+
BRANCH_NAME="${PREFIX}CLI_${version_cli}-GUI_$(version_gui)"
433426
434427
git config user.name 'github-actions[bot]'
435428
git config user.email 'github-actions[bot]@users.noreply.github.com'
@@ -440,15 +433,7 @@ jobs:
440433
git push --set-upstream origin "$BRANCH_NAME"
441434
442435
gh pr create \
443-
--base "$DEFAULT_BRANCH" \
436+
--base "$BASE_BRANCH" \
444437
--head "$BRANCH_NAME" \
445438
--title "Update Core download information (CLI ${version_cli}, GUI ${version_gui})" \
446439
--body "This PR was automatically generated by the Download Hashes workflow to update **src/data/downloads/core.json** based on the latest downloads/hashes.txt."
447-
448-
# Close outdated PRs
449-
if [ -n "$prs" ]; then
450-
for pr in $prs; do
451-
echo "Closing existing PR #$pr"
452-
gh pr close "$pr" --comment "Closed by Actions: superseded by a newer PR."
453-
done
454-
fi

0 commit comments

Comments
 (0)