build(deps): Update cliclack requirement from 0.4.0 to 0.5.4 #188
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: Health | |
| on: | |
| workflow_call: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| CARGO_TERM_COLOR: always | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTC_WRAPPER: "sccache" | |
| ALLOWED_ENDPOINTS: > | |
| api.deps.dev:443 | |
| api.github.com:443 | |
| api.osv.dev:443 | |
| api.scorecard.dev:443 | |
| fulcio.sigstore.dev:443 | |
| github.com:443 | |
| oss-fuzz-build-logs.storage.googleapis.com:443 | |
| rekor.sigstore.dev:443 | |
| tuf-repo-cdn.sigstore.dev:443 | |
| www.bestpractices.dev:443 | |
| github-releases.githubusercontent.com:443 | |
| release-assets.githubusercontent.com:443 | |
| objects.githubusercontent.com:443 | |
| raw.githubusercontent.com:443 | |
| static.rust-lang.org:443 | |
| index.crates.io:443 | |
| static.crates.io:443 | |
| jobs: | |
| check-outdated: | |
| name: Check Outdated Dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0 | |
| with: | |
| disable-sudo: true | |
| egress-policy: block | |
| allowed-endpoints: ${{ env.ALLOWED_ENDPOINTS }} | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1 | |
| with: | |
| toolchain: nightly | |
| - name: Install cargo-binstall | |
| uses: cargo-bins/cargo-binstall@7691a5b29cda4f5499b819e5618012ba4b6c3334 # v1.17.5 | |
| - name: Install and Run cargo-outdated | |
| run: | | |
| cargo binstall -y cargo-outdated | |
| echo "### 📦 Outdated Dependencies" >> $GITHUB_STEP_SUMMARY | |
| echo '```text' >> $GITHUB_STEP_SUMMARY | |
| cargo outdated --exit-code 1 | tee -a $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| check-unused: | |
| name: Check Unused Dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0 | |
| with: | |
| disable-sudo: true | |
| egress-policy: block | |
| allowed-endpoints: ${{ env.ALLOWED_ENDPOINTS }} | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1 | |
| with: | |
| toolchain: nightly | |
| - name: Check for Unused Dependencies | |
| uses: bnjbvr/cargo-machete@7959c845782fed02ee69303126d4a12d64f1db18 # v0.9.1 | |
| with: | |
| summary: true | |
| health-summary: | |
| name: Generate Health Summary | |
| runs-on: ubuntu-latest | |
| needs: [check-outdated, check-unused] | |
| if: always() | |
| steps: | |
| - name: Generate Health Report | |
| run: | | |
| echo "## 🏥 Project Health Report" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| Check | Status |" >> $GITHUB_STEP_SUMMARY | |
| echo "|-------|--------|" >> $GITHUB_STEP_SUMMARY | |
| OUTDATED="${{ needs.check-outdated.result }}" | |
| UNUSED="${{ needs.check-unused.result }}" | |
| if [[ "$OUTDATED" == "success" ]]; then | |
| echo "| Outdated Dependencies | ✅ None found |" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "| Outdated Dependencies | ❌ Found issues |" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| if [[ "$UNUSED" == "success" ]]; then | |
| echo "| Unused Dependencies | ✅ None found |" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "| Unused Dependencies | ❌ Found issues |" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "---" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| if [[ "$OUTDATED" == "success" && "$UNUSED" == "success" ]]; then | |
| echo "### ✅ Perfect Health" >> $GITHUB_STEP_SUMMARY | |
| echo "All dependencies are up-to-date and properly used." >> $GITHUB_STEP_SUMMARY | |
| elif [[ "$OUTDATED" == "failure" && "$UNUSED" == "failure" ]]; then | |
| echo "### ❌ Critical Issues" >> $GITHUB_STEP_SUMMARY | |
| echo "Multiple problems detected: outdated and unused dependencies found." >> $GITHUB_STEP_SUMMARY | |
| elif [[ "$OUTDATED" == "failure" ]]; then | |
| echo "### ⚠️ Outdated Dependencies Detected" >> $GITHUB_STEP_SUMMARY | |
| echo "Some dependencies need updating. Review the details above." >> $GITHUB_STEP_SUMMARY | |
| elif [[ "$UNUSED" == "failure" ]]; then | |
| echo "### ⚠️ Unused Dependencies Detected" >> $GITHUB_STEP_SUMMARY | |
| echo "Some dependencies are not being used. Consider removing them." >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "### ⚠️ Checks Incomplete" >> $GITHUB_STEP_SUMMARY | |
| echo "One or more checks were skipped or cancelled." >> $GITHUB_STEP_SUMMARY | |
| fi |