|
49 | 49 | ## Data Validation |
50 | 50 | - **REQUIRED:** The CSV output must precisely match the format and header order of blackbox_decode CSV files. |
51 | 51 |
|
| 52 | +## GitHub Actions & Workflow Design |
| 53 | +- **Native Tooling First:** Prefer native GitHub Actions features, `git` CLI, and `gh` (GitHub CLI) over third-party actions or custom scripting. |
| 54 | + - Use `gh run list`, `gh run download`, `gh release upload`, `gh release edit` for automation |
| 55 | + - Leverage GitHub Actions built-in context (`github.sha`, `github.ref_name`, `github.token`) instead of external tooling |
| 56 | + - Built-in authentication via `GITHUB_TOKEN` eliminates need for additional secrets |
| 57 | +- **Artifact Reuse:** Design workflows to reuse artifacts across jobs: |
| 58 | + - Build once in ci.yml (triggered on push/tags) |
| 59 | + - Download and reuse in release.yml or other downstream workflows |
| 60 | + - Reduces CI costs and accelerates release cycles (~8-10x faster) |
| 61 | +- **Error Handling:** Workflows should validate dependencies before proceeding: |
| 62 | + - Verify upstream jobs succeeded (e.g., ci.yml completed before release.yml downloads) |
| 63 | + - Provide clear error messages if expected artifacts unavailable |
| 64 | + - Use `set -e` in shell scripts to fail fast on errors |
| 65 | +- **Dependency Management:** Use explicit `needs:` clauses for job ordering: |
| 66 | + - Clear workflow visualization in GitHub Actions UI |
| 67 | + - Prevents race conditions and dependency issues |
| 68 | + - Makes workflow intent unambiguous |
| 69 | + |
52 | 70 | ## Committing Rules |
53 | 71 | - **Commit Conditions:** Only commit if: |
54 | 72 | - `cargo clippy --all-targets --all-features -- -D warnings` passes. |
|
0 commit comments