Skip to content
This repository was archived by the owner on Nov 3, 2026. It is now read-only.

feat: consume JSON output, add cli-version input - #7

Merged
shenxianpeng merged 1 commit into
mainfrom
feature/use-json-output-and-pin-version
May 24, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
feature/use-json-output-and-pin-version

Conversation

@shenxianpeng

Copy link
Copy Markdown
Contributor

Summary

Makes the action robust and reproducible — the #1 engineering issue identified.

Changes

  • JSON parsing — action now calls dm config --format json and parses with python3 -c, replacing fragile awk/sed text scraping
  • cli-version input — allows pinning specific CLI versions for reproducible CI results
  • README updates — recommends @v1 instead of @main, adds Reproducibility section

Example: before vs after

Before (awk/sed text parsing):

SCORE=$(echo "$OUTPUT" | awk '/Your score:/ {print $NF}')

After (JSON):

SCORE=$(echo "$JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['score'])")

- Action now uses dm config --format json instead of awk/sed text parsing
- Add cli-version input to pin CLI version for reproducible results
- README recommends @v1 instead of @main
- Add Reproducibility section to README
@shenxianpeng
shenxianpeng merged commit 350db65 into main May 24, 2026
2 checks passed
@shenxianpeng
shenxianpeng deleted the feature/use-json-output-and-pin-version branch May 24, 2026 20:16
@shenxianpeng shenxianpeng added enhancement New feature or request minor A minor release labels May 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request minor A minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant