Cursor rule
.cursor/rules/github-actions.mdcGitHub Actions Workflow Rules
Cursor rules
Quality
77/100
Scores the file, not the repository.Length
491 words
26 headings · 7 code blocksRepository
126
— · pushed 103 days agoLast changed
3 days ago
First indexed 3 days ago.12345678# GitHub Actions Workflow Rules910## Overview1112Rules for modifying GitHub Actions workflow files (`.github/workflows/*.yml`) in go-crypto-wallet.1314## Runner Configuration1516### Required Runner1718**Always use `ubuntu-slim` as the runner** unless there is a specific reason to use another image.1920```yaml21# Good22runs-on: ubuntu-slim2324# Avoid (unless specifically needed)25runs-on: ubuntu-latest26runs-on: ubuntu-24.0427```2829### Why ubuntu-slim?3031- Faster startup time (smaller image)32- Lower resource consumption33- Contains essential tools for most CI tasks34- Cost-effective for GitHub Actions minutes3536Reference: [GitHub Actions Runner Images](https://github.com/actions/runner-images)3738### Available Runners3940| Image | YAML Label | Use Case |41|-------|------------|----------|42| Ubuntu Slim | `ubuntu-slim` | **Default choice** - most CI tasks |43| Ubuntu 24.04 | `ubuntu-latest` or `ubuntu-24.04` | When additional tools are required |44| Ubuntu 22.04 | `ubuntu-22.04` | Legacy compatibility |4546## Performance Best Practices4748### Avoid Duplication49501. **Reusable Workflows**: Extract common patterns into reusable workflows512. **Composite Actions**: Create composite actions for repeated steps523. **Matrix Strategy**: Use matrix for parallel execution instead of duplicate jobs5354```yaml55# Good: Matrix strategy for parallel execution56strategy:57 matrix:58 go-version: ['1.22', '1.23']5960# Avoid: Duplicate jobs for each version61jobs:62 test-go-122:63 ...64 test-go-123:65 ...66```6768### Caching6970Always use caching for dependencies:7172```yaml73- uses: actions/cache@v474 with:75 path: |76 ~/.cache/go-build77 ~/go/pkg/mod78 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}79```8081### Conditional Execution8283Use path filters to avoid unnecessary runs:8485```yaml86on:87 push:88 paths:89 - '**.go'90 - 'go.mod'91 - 'go.sum'92```9394## Branch Configuration9596### Default Branch9798This repository uses `main` as the default branch. Always use `main` (not `master`):99100```yaml101# Good102on:103 push:104 branches:105 - main106107# Wrong108on:109 push:110 branches:111 - master112```113114## Workflow Structure115116### Standard Workflow Template117118```yaml119name: Workflow Name120121on:122 push:123 branches:124 - main125 paths:126 - 'relevant/paths/**'127 pull_request:128 branches:129 - main130 workflow_dispatch: # Manual trigger131132jobs:133 job-name:134 name: Descriptive Job Name135 runs-on: ubuntu-slim136 timeout-minutes: 10 # Always set timeout137 permissions:138 contents: read # Minimal permissions139 steps:140 - uses: actions/checkout@v6141 # ... steps142```143144### Required Elements145146| Element | Required | Description |147|---------|----------|-------------|148| `timeout-minutes` | Yes | Prevent runaway jobs |149| `permissions` | Yes | Principle of least privilege |150| `runs-on: ubuntu-slim` | Yes | Standard runner |151152## Verification153154Before committing workflow changes:1551561. Validate YAML syntax1572. Check for branch name (`main` not `master`)1583. Verify runner is `ubuntu-slim`1594. Ensure timeout is set1605. Review permissions (minimal required)161162```bash163# Validate YAML syntax164make yaml-lint165```166167## Quick Checklist168169- [ ] Runner is `ubuntu-slim`170- [ ] Branch is `main` (not `master`)171- [ ] `timeout-minutes` is set172- [ ] `permissions` block is defined173- [ ] Path filters are used where appropriate174- [ ] Caching is implemented for dependencies175- [ ] No duplicate jobs (use matrix instead)176177## Related Documentation178179- @.github/workflows/ - Existing workflows180- @.github/labels.yml - Repository labels181182## Related Skills183184- `devops` - CI/CD and DevOps workflow185
Also in hiromaily/go-crypto-wallet
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/agent-files.mdc · 126 | Cursor rules | lint-formatarchdo-notagent-behaviour | 77/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/documentation-language.mdc · 126 | Cursor rules | archdo-notdocs | 36/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/general.mdc · 126 | Cursor rules | buildtestarchgit+2 | 83/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/task-context-loading.mdc · 126 | Cursor rules | archtypesdatabasedo-not+1 | 93/100 | 3 days ago | |
| hiromaily/go-crypto-walletpkg/AGENTS.md · 126 | AGENTS.md | stylearchdo-not | 80/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/proto.mdc · 126 | Cursor rules | buildlint-formatstylearch+3 | 96/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/security.mdc · 126 | Cursor rules | archsecuritydo-notagent-behaviour | 76/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/shell-script.mdc · 126 | Cursor rules | setupteststylearch+1 | 73/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/ssot.mdc · 126 | Cursor rules | stylearchtypesdo-not+2 | 84/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/yaml.mdc · 126 | Cursor rules | lint-formatstylearchtypes+3 | 84/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.github/copilot-instructions.md · 126 | Copilot instructions | teststylearchsecurity+1 | 56/100 | 3 days ago | |
| hiromaily/go-crypto-walletAGENTS.md · 126 | AGENTS.md | archtypesdo-notagent-behaviour+1 | 79/100 | 3 days ago | |
| hiromaily/go-crypto-walletCLAUDE.md · 126 | CLAUDE.md | archtypesdo-notagent-behaviour+1 | 79/100 | 3 days ago |
Diff against .cursor/rules/agent-files.mdc Diff against .cursor/rules/documentation-language.mdc Diff against .cursor/rules/general.mdc Diff against .cursor/rules/task-context-loading.mdc Diff against pkg/AGENTS.md Diff against .cursor/rules/proto.mdc Diff against .cursor/rules/security.mdc Diff against .cursor/rules/shell-script.mdc Diff against .cursor/rules/ssot.mdc Diff against .cursor/rules/typescript.mdc Diff against .cursor/rules/yaml.mdc Diff against .github/copilot-instructions.md Diff against AGENTS.md Diff against CLAUDE.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
