From 4bb7bee1e4756d61b4e3c07ca35e7f3f785396ee Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 11:24:51 +0000 Subject: [PATCH] ci: Remove Rust toolchain update bot sentry-cli is no longer actively developed, so keeping the pinned Rust toolchain current is not worth the weekly PR noise. Co-Authored-By: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com> --- .github/workflows/rust-toolchain-update.yml | 146 -------------------- 1 file changed, 146 deletions(-) delete mode 100644 .github/workflows/rust-toolchain-update.yml diff --git a/.github/workflows/rust-toolchain-update.yml b/.github/workflows/rust-toolchain-update.yml deleted file mode 100644 index 8057cbb3cc..0000000000 --- a/.github/workflows/rust-toolchain-update.yml +++ /dev/null @@ -1,146 +0,0 @@ -name: Rust Toolchain Update Bot - -on: - schedule: - # Run weekly on Mondays at 00:00 UTC - - cron: '0 0 * * 1' - -jobs: - check-and-update: - name: Check for Rust toolchain updates - runs-on: ubuntu-24.04 - - permissions: - contents: write - pull-requests: write - actions: write - - steps: - - name: Checkout Repository - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # 7.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Configure git - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - - - name: Check for Rust toolchain update - id: rust-check - run: | - set -e - - # Get latest stable Rust version - curl -s "https://static.rust-lang.org/dist/channel-rust-stable.toml" > channel.toml - LATEST_FULL=$(yq '.pkg.rust.version' channel.toml | sed 's/ (.*//') - LATEST_MINOR=$(echo "$LATEST_FULL" | cut -d. -f1,2) - - # Get current version - CURRENT=$(yq '.toolchain.channel' rust-toolchain.toml) - - echo "Current: $CURRENT, Latest: $LATEST_MINOR" - - if [ "$LATEST_MINOR" != "$CURRENT" ]; then - echo "needs_update=true" >> $GITHUB_OUTPUT - echo "new_version=$LATEST_MINOR" >> $GITHUB_OUTPUT - echo "full_version=$LATEST_FULL" >> $GITHUB_OUTPUT - echo "✅ Update available: $CURRENT → $LATEST_MINOR" - else - echo "needs_update=false" >> $GITHUB_OUTPUT - echo "⭐ Already on latest version: $CURRENT" - fi - - - name: Update toolchain file and create branch - id: rust-update - if: steps.rust-check.outputs.needs_update == 'true' - env: - NEW_VERSION: ${{ steps.rust-check.outputs.new_version }} - run: | - # Define commit title - COMMIT_TITLE="build(rust): Update Rust toolchain to $NEW_VERSION" - - # Update rust-toolchain.toml - sed -i 's/channel = "[0-9.]*"/channel = "'$NEW_VERSION'"/' rust-toolchain.toml - - # Create branch and commit - BRANCH_NAME="rust-toolchain/update-to-$NEW_VERSION" - git checkout -B "$BRANCH_NAME" - git add rust-toolchain.toml - git commit -m "$COMMIT_TITLE" - git push origin "$BRANCH_NAME" --force - - # Set outputs for next step - echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT - echo "commit_title=$COMMIT_TITLE" >> $GITHUB_OUTPUT - - - name: Create pull request - if: steps.rust-check.outputs.needs_update == 'true' - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # 9.0.0 - env: - NEW_VERSION: ${{ steps.rust-check.outputs.new_version }} - FULL_VERSION: ${{ steps.rust-check.outputs.full_version }} - BRANCH_NAME: ${{ steps.rust-update.outputs.branch_name }} - COMMIT_TITLE: ${{ steps.rust-update.outputs.commit_title }} - BASE_REF: ${{ github.ref_name }} - with: - script: | - const newVersion = process.env.NEW_VERSION; - const fullVersion = process.env.FULL_VERSION; - const branchName = process.env.BRANCH_NAME; - const commitTitle = process.env.COMMIT_TITLE; - const baseRef = process.env.BASE_REF; - - // Check if PR already exists - try { - const { data: existingPRs } = await github.rest.pulls.list({ - owner: context.repo.owner, - repo: context.repo.repo, - head: `${context.repo.owner}:${branchName}`, - state: 'open' - }); - - if (existingPRs.length > 0) { - console.log(`PR already exists: #${existingPRs[0].number}`); - return; - } - } catch (error) { - console.log('No existing PR found, creating new one'); - } - - // Create new PR - const { data: pr } = await github.rest.pulls.create({ - owner: context.repo.owner, - repo: context.repo.repo, - title: commitTitle, - head: branchName, - base: baseRef, - body: `Update Rust toolchain to ${newVersion} (${fullVersion}). - - **Changes:** - - Update \`rust-toolchain.toml\` channel to \`${newVersion}\` - - **Release Notes:** https://github.com/rust-lang/rust/releases/tag/${fullVersion} - - --- - 🤖 *This PR was created automatically by the Rust toolchain update bot.*` - }); - - // Add labels - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - labels: ['github_actions'] - }); - - console.log(`Created PR #${pr.number}: ${pr.title}`); - - // Run the CI workflow on the PR branch. Needed because GITHUB_TOKEN - // doesn't trigger workflows, except for workflow_dispatch. - await github.rest.actions.createWorkflowDispatch({ - owner: context.repo.owner, - repo: context.repo.repo, - workflow_id: 'ci.yml', - ref: branchName, - });