|
52 | 52 | runs-on: ubuntu-latest |
53 | 53 |
|
54 | 54 | steps: |
55 | | - - name: Clear potential caches |
56 | | - run: | |
57 | | - # Clear any local caches that might interfere |
58 | | - rm -rf ~/.cache/* || true |
59 | | - rm -rf /tmp/* || true |
60 | | - |
61 | | - # Force environment refresh |
62 | | - echo "CACHE_BUST=$(date +%s)" >> $GITHUB_ENV |
63 | | - |
| 55 | + |
64 | 56 | - name: Checkout repository |
65 | 57 | uses: actions/checkout@v4 |
66 | 58 |
|
@@ -518,57 +510,57 @@ jobs: |
518 | 510 | echo "PR_BODY_FILE=pr_body.md" >> $GITHUB_ENV |
519 | 511 | cat pr_body.md |
520 | 512 |
|
521 | | - - name: Create or Update Pull Request |
522 | | - env: |
523 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
524 | | - run: | |
525 | | - # Check if we have any staged files or changes to commit |
526 | | - if git diff --cached --quiet && git diff --quiet; then |
527 | | - echo "No changes detected, but creating empty commit to update PR parameters" |
528 | | - # Read the commit message from file |
529 | | - COMMIT_MSG=$(cat pr_commit_message.txt) |
530 | | - git commit --allow-empty -m "$COMMIT_MSG" |
531 | | - else |
532 | | - echo "Changes detected, committing staged files" |
533 | | - # Read the commit message from file |
534 | | - COMMIT_MSG=$(cat pr_commit_message.txt) |
535 | | - git commit -m "$COMMIT_MSG" |
536 | | - fi |
537 | | - |
538 | | - # Push the changes |
539 | | - git push origin "${{ env.BRANCH_NAME }}" |
540 | | - |
541 | | - # Check if PR already exists |
542 | | - EXISTING_PR=$(gh pr list --head "${{ env.BRANCH_NAME }}" --base "${{ env.TARGET_BRANCH }}" --json number --jq '.[0].number' 2>/dev/null || echo "") |
543 | | - |
544 | | - if [ -n "$EXISTING_PR" ] && [ "$EXISTING_PR" != "null" ]; then |
545 | | - echo "Updating existing PR #$EXISTING_PR" |
546 | | - # Update existing PR body |
547 | | - gh pr edit "$EXISTING_PR" --body-file pr_body.md |
548 | | - echo "✅ Updated existing PR #$EXISTING_PR" |
549 | | - else |
550 | | - echo "Creating new PR" |
551 | | - gh pr create \ |
552 | | - --base "${{ env.TARGET_BRANCH }}" \ |
553 | | - --head "${{ env.BRANCH_NAME }}" \ |
554 | | - --title "🚀 Upgrade to Xion ${{ env.RELEASE_TAG }}" \ |
555 | | - --body-file pr_body.md |
556 | | - echo "✅ PR created successfully" |
557 | | - fi |
558 | | - |
559 | | - - name: Workflow Summary |
560 | | - run: | |
561 | | - echo "## 📋 Workflow Summary" |
562 | | - echo "" |
563 | | - echo "✅ PR has been created/updated for release ${{ env.RELEASE_TAG }}" |
564 | | - echo " - Proposal: ${{ env.PROPOSAL_FILE }}" |
565 | | - echo " - Release config: ${{ env.RELEASE_FILE }}" |
566 | | - echo " - Release notes: ${{ env.RELEASE_NOTES_FILE }}" |
567 | | - echo "" |
568 | | - echo "🔄 Configuration for this run:" |
569 | | - echo " - Release Tag: ${{ env.RELEASE_TAG }}" |
570 | | - echo " - Upgrade Height: ${{ env.CALCULATED_HEIGHT }}" |
571 | | - echo " - Deposit: ${{ env.DEPOSIT }}" |
572 | | - echo " - Expedited: ${{ env.EXPEDITED }}" |
573 | | - echo " - Run Number: ${{ github.run_number }}" |
| 513 | + # - name: Create or Update Pull Request |
| 514 | + # env: |
| 515 | + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 516 | + # run: | |
| 517 | + # # Check if we have any staged files or changes to commit |
| 518 | + # if git diff --cached --quiet && git diff --quiet; then |
| 519 | + # echo "No changes detected, but creating empty commit to update PR parameters" |
| 520 | + # # Read the commit message from file |
| 521 | + # COMMIT_MSG=$(cat pr_commit_message.txt) |
| 522 | + # git commit --allow-empty -m "$COMMIT_MSG" |
| 523 | + # else |
| 524 | + # echo "Changes detected, committing staged files" |
| 525 | + # # Read the commit message from file |
| 526 | + # COMMIT_MSG=$(cat pr_commit_message.txt) |
| 527 | + # git commit -m "$COMMIT_MSG" |
| 528 | + # fi |
| 529 | + |
| 530 | + # # Push the changes |
| 531 | + # git push origin "${{ env.BRANCH_NAME }}" |
| 532 | + |
| 533 | + # # Check if PR already exists |
| 534 | + # EXISTING_PR=$(gh pr list --head "${{ env.BRANCH_NAME }}" --base "${{ env.TARGET_BRANCH }}" --json number --jq '.[0].number' 2>/dev/null || echo "") |
| 535 | + |
| 536 | + # if [ -n "$EXISTING_PR" ] && [ "$EXISTING_PR" != "null" ]; then |
| 537 | + # echo "Updating existing PR #$EXISTING_PR" |
| 538 | + # # Update existing PR body |
| 539 | + # gh pr edit "$EXISTING_PR" --body-file pr_body.md |
| 540 | + # echo "✅ Updated existing PR #$EXISTING_PR" |
| 541 | + # else |
| 542 | + # echo "Creating new PR" |
| 543 | + # gh pr create \ |
| 544 | + # --base "${{ env.TARGET_BRANCH }}" \ |
| 545 | + # --head "${{ env.BRANCH_NAME }}" \ |
| 546 | + # --title "🚀 Upgrade to Xion ${{ env.RELEASE_TAG }}" \ |
| 547 | + # --body-file pr_body.md |
| 548 | + # echo "✅ PR created successfully" |
| 549 | + # fi |
| 550 | + |
| 551 | + # - name: Workflow Summary |
| 552 | + # run: | |
| 553 | + # echo "## 📋 Workflow Summary" |
| 554 | + # echo "" |
| 555 | + # echo "✅ PR has been created/updated for release ${{ env.RELEASE_TAG }}" |
| 556 | + # echo " - Proposal: ${{ env.PROPOSAL_FILE }}" |
| 557 | + # echo " - Release config: ${{ env.RELEASE_FILE }}" |
| 558 | + # echo " - Release notes: ${{ env.RELEASE_NOTES_FILE }}" |
| 559 | + # echo "" |
| 560 | + # echo "🔄 Configuration for this run:" |
| 561 | + # echo " - Release Tag: ${{ env.RELEASE_TAG }}" |
| 562 | + # echo " - Upgrade Height: ${{ env.CALCULATED_HEIGHT }}" |
| 563 | + # echo " - Deposit: ${{ env.DEPOSIT }}" |
| 564 | + # echo " - Expedited: ${{ env.EXPEDITED }}" |
| 565 | + # echo " - Run Number: ${{ github.run_number }}" |
574 | 566 |
|
0 commit comments