Skip to content

Commit df1d541

Browse files
committed
ci(core): run core-sync scripts through mise tasks
Add core:drift-issue and core:report-failure tasks so the core-watch and core-drift workflows call mise tasks for every step, matching how the scripts are run locally. Align mise-action with the v5.2.6 pin used by the other workflows. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
1 parent 1854188 commit df1d541

4 files changed

Lines changed: 23 additions & 15 deletions

File tree

‎.github/workflows/core-drift.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: Apache-2.0
22

33
# Nightly comparison of core main with the pinned core tag; keeps the single
4-
# "Core main drift" issue current (scripts/core-sync/drift-check.sh).
4+
# "Core main drift" issue current (mise run core:drift).
55
name: core-drift
66

77
on:
@@ -36,24 +36,24 @@ jobs:
3636
with:
3737
persist-credentials: false
3838

39-
- uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0
39+
- uses: jdx/mise-action@f5be966e4a917d54244728e6a5fdcd1d93a35e6c # v5.2.6
4040

4141
# Exit 1 with a report means drift; the issue records it. No report
4242
# means the check itself broke, which the failure step records.
4343
- name: Check drift against core main
4444
run: |
45-
scripts/core-sync/drift-check.sh --out drift-report.md || true
45+
mise run core:drift -- --out drift-report.md || true
4646
test -s drift-report.md
4747
cat drift-report.md >>"$GITHUB_STEP_SUMMARY"
4848
4949
- name: Update the drift issue
5050
env:
5151
GH_TOKEN: ${{ steps.app-token.outputs.token }}
52-
run: scripts/core-sync/update-drift-issue.sh drift-report.md
52+
run: mise run core:drift-issue -- drift-report.md
5353

5454
- name: Report failure
5555
if: failure()
5656
env:
5757
GH_TOKEN: ${{ steps.app-token.outputs.token }}
5858
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
59-
run: scripts/core-sync/report-failure.sh core-drift "$RUN_URL"
59+
run: mise run core:report-failure -- core-drift "$RUN_URL"

‎.github/workflows/core-watch.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: Apache-2.0
22

33
# Opens one update proposal per new core release tag
4-
# (scripts/core-sync/open-bump-pr.sh).
4+
# (mise run core:bump).
55
name: core-watch
66

77
on:
@@ -45,7 +45,7 @@ jobs:
4545
token: ${{ steps.app-token.outputs.token }}
4646
persist-credentials: true
4747

48-
- uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0
48+
- uses: jdx/mise-action@f5be966e4a917d54244728e6a5fdcd1d93a35e6c # v5.2.6
4949

5050
- name: Set the bot identity
5151
env:
@@ -66,19 +66,19 @@ jobs:
6666
if [ -n "$INPUT_TAG" ]; then
6767
tags=$INPUT_TAG
6868
else
69-
tags=$(scripts/core-sync/core-tags.sh)
69+
tags=$(mise run --quiet core:tags)
7070
fi
7171
if [ -z "$tags" ]; then
7272
echo "No core tags newer than $(mise run --quiet core:version)."
7373
exit 0
7474
fi
7575
for t in $tags; do
76-
scripts/core-sync/open-bump-pr.sh "$t"
76+
mise run core:bump -- "$t"
7777
done
7878
7979
- name: Report failure
8080
if: failure()
8181
env:
8282
GH_TOKEN: ${{ steps.app-token.outputs.token }}
8383
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
84-
run: scripts/core-sync/report-failure.sh core-watch "$RUN_URL"
84+
run: mise run core:report-failure -- core-watch "$RUN_URL"

‎mise.toml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,11 @@ run = "scripts/core-sync/open-bump-pr.sh"
156156
[tasks."core:drift"]
157157
description = "Compare core main with the pin: mise run core:drift -- --out <report.md>"
158158
run = "scripts/core-sync/drift-check.sh"
159+
160+
[tasks."core:drift-issue"]
161+
description = "Create, update, or close the core main drift issue from a report: mise run core:drift-issue -- <report.md> [--dry-run]"
162+
run = "scripts/core-sync/update-drift-issue.sh"
163+
164+
[tasks."core:report-failure"]
165+
description = "Record a failed automation run in the drift issue: mise run core:report-failure -- <job> <run-url> [--dry-run]"
166+
run = "scripts/core-sync/report-failure.sh"

‎scripts/README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ The workflows use a GitHub App token from the `sdk-bot` environment (secrets `SD
1414
| `open-bump-pr.sh <tag> [--dry-run]` | `core:bump` | Open the update proposal for one core tag: branch `core/<tag>`, pin change, regenerated bindings, refreshed copies of core files, proto diff in the body, labels `core-bump` plus `stable` or `prerelease`. Closes older pre-release proposals. |
1515
| `bump-pr-body.md` | | PR body template for `open-bump-pr.sh`. |
1616
| `drift-check.sh --out <file>` | `core:drift` | Compare core `main` with the pin: `buf breaking`, regenerate and run the unit tests, list the RPCs the SDK doesn't call. Writes the markdown report. |
17-
| `update-drift-issue.sh <report.md> [--dry-run]` | | Create, update, or close the single `Core main drift` issue from a report. |
18-
| `report-failure.sh <job> <run-url> [--dry-run]` | | Append a dated failure line to the drift issue. Called from `if: failure()` steps. |
17+
| `update-drift-issue.sh <report.md> [--dry-run]` | `core:drift-issue` | Create, update, or close the single `Core main drift` issue from a report. |
18+
| `report-failure.sh <job> <run-url> [--dry-run]` | `core:report-failure` | Append a dated failure line to the drift issue. Called from `if: failure()` steps. |
1919
| `drift-issue.sh` | | Shared helpers for the two drift issue scripts (sourced, not run). |
2020

21-
| Workflow | Runs |
21+
| Workflow | Runs (mise tasks) |
2222
|----------|------|
23-
| `core-watch.yml` (hourly) | `core-tags.sh`, then `open-bump-pr.sh` per tag |
24-
| `core-drift.yml` (nightly) | `drift-check.sh`, then `update-drift-issue.sh` |
23+
| `core-watch.yml` (hourly) | `core:tags`, then `core:bump` per tag |
24+
| `core-drift.yml` (nightly) | `core:drift`, then `core:drift-issue` |
2525

2626
Bump PRs run E2E against their own pin, because `e2e.yml` defaults to `OPENSHELL_CORE_REF` on the PR branch.
2727

0 commit comments

Comments
 (0)