|
13 | 13 | permissions: |
14 | 14 | contents: write |
15 | 15 | pull-requests: write |
| 16 | + actions: read |
| 17 | + id-token: write |
16 | 18 | steps: |
17 | 19 | - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
18 | 20 | - uses: ./.github/actions/clone |
|
24 | 26 | with: |
25 | 27 | save-cache: ${{ github.ref_name == 'main' }} |
26 | 28 | cache-key: upgrade-deps |
| 29 | + tools: just,cargo-shear |
27 | 30 |
|
28 | 31 | - uses: oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4 |
29 | 32 |
|
|
50 | 53 |
|
51 | 54 | - name: Build |
52 | 55 | uses: ./.github/actions/build-upstream |
| 56 | + id: build-upstream |
| 57 | + continue-on-error: true |
53 | 58 | with: |
54 | 59 | target: x86_64-unknown-linux-gnu |
| 60 | + |
| 61 | + - uses: anthropics/claude-code-action@a017b830c03e23789b11fb69ed571ea61c12e45c # v1.0.0 |
| 62 | + if: steps.build-upstream.outcome == 'failure' |
| 63 | + with: |
| 64 | + claude_code_oauth_token: ${{ secrets.ANTHROPIC_API_KEY }} |
| 65 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 66 | + prompt: | |
| 67 | + Check why the build-upstream steps failed and fix them. |
| 68 | + ### Background |
| 69 | + - The build-upstream steps are at ./.github/actions/build-upstream/action.yml |
| 70 | + - The deps upgrade script is at ./.github/scripts/upgrade-deps.mjs |
| 71 | +
|
| 72 | + ### Instructions |
| 73 | + - We are using `pnpm` as the package manager |
| 74 | + - We are aiming to upgrade all dependencies to the latest versions in this workflow, so don't downgrade any dependencies. |
| 75 | + - Check `.claude/agents/cargo-workspace-merger.md` if rolldown hash is changed. |
| 76 | + - If deps in our `Cargo.toml` need to be upgraded, you can refer to the `./.claude/agents/cargo-workspace-merger.md` |
| 77 | + - If `Cargo.toml` has been modified, you need to run `cargo shear` to ensure there is nothing wrong with our dependencies. |
| 78 | + - Run `cargo check --all-targets --all-features` to ensure everything works fine if any Rust related codes are modified. |
| 79 | + - Run the steps in `build-upstream` action.yml after your fixing. If no errors are found, you can safe to exit. |
| 80 | + - Your final step is to run `just build` to ensure all builds are successful. |
| 81 | + - Run `pnpm run lint` to check if there are any issues after the build, if has, deep investigate it and fix it. You need to run `just build` before you can run `pnpm run lint`. |
| 82 | + - Run `pnpm run test` after `just build` to ensure all tests are successful. |
| 83 | + - The snapshot tests in `pnpm run test` are always successful, you need to check the updated snapshot to see if there is anything wrong after our deps upgrade. |
| 84 | +
|
| 85 | + Help me fix the errors in `build-upstream` steps, no need to commit changes after your fixing. |
| 86 | + claude_args: | |
| 87 | + --model opus --allowedTools "Bash,Edit,Replace,NotebookEditCell" |
| 88 | + additional_permissions: | |
| 89 | + actions: read |
| 90 | +
|
55 | 91 | - name: Update lockfile |
56 | 92 | run: | |
57 | 93 | pnpm install --no-frozen-lockfile |
|
0 commit comments