refactor(health): unified HealthMonitor API — one class for all deplo… #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update QPK Pin | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - "QPK_PIN" | |
| - "docs/**" | |
| - "**.md" | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-pin: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Update QPK_PIN | |
| run: | | |
| SHA=$(git rev-parse HEAD) | |
| echo "$SHA" > QPK_PIN | |
| # Update constraints.txt with latest QPK SHA | |
| sed -i "s|quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@[a-f0-9]*|quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@$SHA|" constraints.txt | |
| # Fetch latest SHAs from all strategy repos and update constraints | |
| for repo in UsEquityStrategies HkEquityStrategies CnEquityStrategies CryptoStrategies QuantUsComboStrategies; do | |
| REMOTE_SHA=$(git ls-remote "https://github.com/QuantStrategyLab/$repo.git" HEAD | cut -f1) | |
| [ -n "$REMOTE_SHA" ] && sed -i "s|${repo,,} @ git+https://github.com/QuantStrategyLab/$repo.git@[a-f0-9]*|${repo,,} @ git+https://github.com/QuantStrategyLab/$repo.git@$REMOTE_SHA|" constraints.txt || true | |
| done | |
| - name: Commit and push updated pin | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add QPK_PIN | |
| if git diff --cached --quiet; then | |
| echo "QPK_PIN already up to date" | |
| else | |
| git commit -m "chore: update QPK_PIN to $SHA" | |
| git push | |
| fi |