diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b5e2bfaa7..76fe6354f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,8 @@ on: pull_request: + workflow_dispatch: + concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true diff --git a/.github/workflows/rust-toolchain-update.yml b/.github/workflows/rust-toolchain-update.yml index 2478f351a5..60fa763309 100644 --- a/.github/workflows/rust-toolchain-update.yml +++ b/.github/workflows/rust-toolchain-update.yml @@ -4,6 +4,7 @@ on: schedule: # Run weekly on Mondays at 00:00 UTC - cron: '0 0 * * 1' + pull_request: jobs: check-and-update: @@ -13,6 +14,7 @@ jobs: permissions: contents: write pull-requests: write + actions: write steps: - name: Checkout Repository @@ -106,7 +108,7 @@ jobs: repo: context.repo.repo, title: commitTitle, head: branchName, - base: '${{ github.ref_name }}', + base: '${{ github.head_ref }}', body: `Update Rust toolchain to ${newVersion} (${fullVersion}). **Changes:** @@ -127,3 +129,12 @@ jobs: }); 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, + }); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 6697c67365..78ad751080 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] # We pin the minor version to prevent new Clippy lints from breaking CI. # But, we still want to pick up new patch versions. -channel = "1.89" +channel = "1.88"