Skip to content

Commit d8e88de

Browse files
committed
ci: add graphite optimizer (#983)
<!-- CURSOR_SUMMARY --> > [!NOTE] > **Low Risk** > Low risk: changes only GitHub Actions workflow control flow, but could inadvertently skip CI if the optimizer output or secret is misconfigured. > > **Overview** > Introduces a new `optimize-ci` job using `withgraphite/graphite-ci-action` (token via `GRAPHITE_CI_OPTIMIZER_TOKEN`) to decide whether CI should run. > > Updates `detect-changes` to depend on `optimize-ci` and to short-circuit the workflow when the optimizer indicates `skip == 'true'`, preventing downstream jobs from running in that case. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3c827f1. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 73b7a01 commit d8e88de

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,21 @@ defaults:
2323
shell: bash
2424

2525
jobs:
26+
optimize-ci:
27+
runs-on: ubuntu-latest # or whichever runner you use for your CI
28+
outputs:
29+
skip: ${{ steps.check_skip.outputs.skip }}
30+
steps:
31+
- name: Optimize CI
32+
id: check_skip
33+
uses: withgraphite/graphite-ci-action@ee395f3a78254c006d11339669c6cabddf196f72
34+
with:
35+
graphite_token: ${{ secrets.GRAPHITE_CI_OPTIMIZER_TOKEN }}
36+
2637
detect-changes:
2738
runs-on: ubuntu-latest
39+
needs: optimize-ci
40+
if: needs.optimize-ci.outputs.skip == 'false'
2841
permissions:
2942
contents: read
3043
pull-requests: read

0 commit comments

Comments
 (0)