Github Action Rules
- •Check if
package.jsonexists in project root and summarize key scripts - •Check if
.nvmrcexists in project root - •Check if
.env.exampleexists in project root to identify keyenv:variables - •Always use
git branch -a | catto verify whether we usemainormasterbranch - •Always use
env:variables and secrets attached to jobs instead of global workflows - •Always use
npm cifor Node-based dependency setup - •Extract common steps into composite actions in separate files
- •Once you're done, as a final step conduct the following:
- •For each public action always use <tool>"Run Terminal"</tool> to see what is the most up-to-date version (use only major version):
bash
curl -s https://api.github.com/repos/{owner}/{repo}/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([0-9]+).*/\1/'
- •(Ask if needed) Use <tool>"Run Terminal"</tool> to fetch README.md and see if we're not using any deprecated actions by mistake:
bash
curl -s https://raw.githubusercontent.com/{owner}/{repo}/refs/tags/v{TAG_VERSION}/README.md
- •(Ask if needed) Use <tool>"Run Terminal"</tool> to fetch repo metadata and see if we're not using any deprecated actions by mistake:
bash
curl -s https://api.github.com/repos/{owner}/{repo} | grep '"archived":'
- •(Ask if needed) In case of linter issues related to action parameters, try to fetch action description directly from GitHub and use the following command:
bash
curl -s https://raw.githubusercontent.com/{owner}/{repo}/refs/heads/{main/master}/action.yml