@hybridlabor-api/aos 4.8.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/agents.md +1 -1
- package/.agents/nodes.json +1 -1
- package/.agents/vendor-manifest.json +23 -1
- package/.claude/agents/godmode-media-eventtech.md +1 -1
- package/.claude/hooks/conventional-commits.mjs +125 -0
- package/.claude/hooks/env-file-protection.mjs +105 -0
- package/.claude/hooks/go-gate.mjs +101 -81
- package/.claude/settings.json +13 -0
- package/.opencode/agents/godmode-media-eventtech.md +1 -1
- package/.opencode/plugins/bdb-aos.js +31 -4
- package/README.de.md +1 -1
- package/README.md +1 -1
- package/README.pt.md +1 -1
- package/THIRD_PARTY_NOTICES.md +88 -0
- package/docs/skills_table.md +1 -1
- package/installer.js +174 -46
- package/package.json +6 -2
- package/packages/aos-cli/README.md +80 -0
- package/packages/aos-cli/bin/aos-cli.mjs +134 -0
- package/packages/aos-cli/core-skills.json +12 -0
- package/packages/aos-cli/extensions/aos.ts +321 -0
- package/packages/aos-cli/package-lock.json +1923 -0
- package/packages/aos-cli/package.json +29 -0
- package/packages/aos-cli/scripts/check-theme.mjs +63 -0
- package/packages/aos-cli/themes/aos.json +97 -0
- package/scripts/build-plugin-manifest.mjs +131 -0
- package/scripts/validate-skills.mjs +81 -6
- package/skills/basic/ao-orchestrator/SKILL.md +116 -0
- package/skills/global_config/agenttrail/SKILL.md +6 -1
- package/skills/global_config/ask-tim/SKILL.md +4 -4
- package/skills/global_config/bash-script-generator/SKILL.md +201 -0
- package/skills/global_config/bash-script-generator/assets/templates/standard-template.sh +96 -0
- package/skills/global_config/bash-script-generator/docs/bash-scripting-guide.md +729 -0
- package/skills/global_config/bash-script-generator/docs/generation-best-practices.md +193 -0
- package/skills/global_config/bash-script-generator/docs/script-patterns.md +566 -0
- package/skills/global_config/bash-script-generator/docs/text-processing-guide.md +437 -0
- package/skills/global_config/bash-script-generator/examples/log-analyzer.sh +92 -0
- package/skills/global_config/bash-script-generator/scripts/generate_script_template.sh +123 -0
- package/skills/global_config/bash-script-generator/scripts/run_ci_checks.sh +172 -0
- package/skills/global_config/bash-script-generator/scripts/test_generator.sh +413 -0
- package/skills/global_config/bash-script-validator/SKILL.md +249 -0
- package/skills/global_config/bash-script-validator/docs/awk-reference.md +449 -0
- package/skills/global_config/bash-script-validator/docs/bash-reference.md +468 -0
- package/skills/global_config/bash-script-validator/docs/common-mistakes.md +623 -0
- package/skills/global_config/bash-script-validator/docs/grep-reference.md +395 -0
- package/skills/global_config/bash-script-validator/docs/regex-reference.md +391 -0
- package/skills/global_config/bash-script-validator/docs/sed-reference.md +454 -0
- package/skills/global_config/bash-script-validator/docs/shell-reference.md +463 -0
- package/skills/global_config/bash-script-validator/docs/shellcheck-reference.md +399 -0
- package/skills/global_config/bash-script-validator/examples/bad-bash.sh +55 -0
- package/skills/global_config/bash-script-validator/examples/bad-shell.sh +54 -0
- package/skills/global_config/bash-script-validator/examples/good-bash.sh +71 -0
- package/skills/global_config/bash-script-validator/examples/good-shell.sh +69 -0
- package/skills/global_config/bash-script-validator/scripts/run_ci_checks.sh +23 -0
- package/skills/global_config/bash-script-validator/scripts/shellcheck_wrapper.sh +174 -0
- package/skills/global_config/bash-script-validator/scripts/test_validate.sh +446 -0
- package/skills/global_config/bash-script-validator/scripts/validate.sh +512 -0
- package/skills/global_config/ci-pipeline/SKILL.md +135 -0
- package/skills/global_config/dispatching-parallel-agents/SKILL.md +170 -0
- package/skills/global_config/dockerfile-generator/SKILL.md +1038 -0
- package/skills/global_config/dockerfile-generator/examples/example.dockerignore +95 -0
- package/skills/global_config/dockerfile-generator/examples/golang-distroless.Dockerfile +34 -0
- package/skills/global_config/dockerfile-generator/examples/java-springboot.Dockerfile +45 -0
- package/skills/global_config/dockerfile-generator/examples/nextjs-production.Dockerfile +49 -0
- package/skills/global_config/dockerfile-generator/examples/nodejs-multistage.Dockerfile +55 -0
- package/skills/global_config/dockerfile-generator/examples/python-fastapi.Dockerfile +48 -0
- package/skills/global_config/dockerfile-generator/references/language_specific_guides.md +510 -0
- package/skills/global_config/dockerfile-generator/references/multistage_builds.md +570 -0
- package/skills/global_config/dockerfile-generator/references/optimization_patterns.md +492 -0
- package/skills/global_config/dockerfile-generator/references/security_best_practices.md +375 -0
- package/skills/global_config/dockerfile-generator/scripts/generate_dockerignore.sh +199 -0
- package/skills/global_config/dockerfile-generator/scripts/generate_golang.sh +172 -0
- package/skills/global_config/dockerfile-generator/scripts/generate_java.sh +185 -0
- package/skills/global_config/dockerfile-generator/scripts/generate_nodejs.sh +279 -0
- package/skills/global_config/dockerfile-generator/scripts/generate_python.sh +218 -0
- package/skills/global_config/dockerfile-generator/scripts/test_generator.sh +210 -0
- package/skills/global_config/dockerfile-validator/SKILL.md +300 -0
- package/skills/global_config/dockerfile-validator/examples/.dockerignore.example +34 -0
- package/skills/global_config/dockerfile-validator/examples/bad-example.Dockerfile +37 -0
- package/skills/global_config/dockerfile-validator/examples/golang-distroless.Dockerfile +50 -0
- package/skills/global_config/dockerfile-validator/examples/good-example.Dockerfile +52 -0
- package/skills/global_config/dockerfile-validator/examples/python-optimized.Dockerfile +53 -0
- package/skills/global_config/dockerfile-validator/examples/security-issues.Dockerfile +42 -0
- package/skills/global_config/dockerfile-validator/references/docker_best_practices.md +348 -0
- package/skills/global_config/dockerfile-validator/references/optimization_guide.md +473 -0
- package/skills/global_config/dockerfile-validator/references/security_checklist.md +208 -0
- package/skills/global_config/dockerfile-validator/scripts/dockerfile-validate.sh +699 -0
- package/skills/global_config/dockerfile-validator/scripts/test_validate.sh +35 -0
- package/skills/global_config/dockerfile-validator/tests/fixtures/copy-before-yarn-lock-read.Dockerfile +6 -0
- package/skills/global_config/dockerfile-validator/tests/fixtures/copy-before-yarn.Dockerfile +6 -0
- package/skills/global_config/dockerfile-validator/tests/fixtures/from-platform-nonroot.Dockerfile +7 -0
- package/skills/global_config/dockerfile-validator/tests/test_regression.sh +164 -0
- package/skills/global_config/finishing-a-development-branch/SKILL.md +228 -0
- package/skills/global_config/github-actions-generator/SKILL.md +353 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/composite/action.yml +82 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/docker/Dockerfile +25 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/docker/action.yml +42 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/docker/entrypoint.sh +27 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/javascript/action.yml +33 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/javascript/index.js +50 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/javascript/package.json +27 -0
- package/skills/global_config/github-actions-generator/assets/templates/workflow/basic_workflow.yml +242 -0
- package/skills/global_config/github-actions-generator/assets/templates/workflow/reusable_workflow.yml +106 -0
- package/skills/global_config/github-actions-generator/examples/README.md +147 -0
- package/skills/global_config/github-actions-generator/examples/actions/setup-node-cached/action.yml +93 -0
- package/skills/global_config/github-actions-generator/examples/caching/docker-buildkit.yml +256 -0
- package/skills/global_config/github-actions-generator/examples/security/dependency-review.yml +62 -0
- package/skills/global_config/github-actions-generator/examples/security/sbom-attestation.yml +119 -0
- package/skills/global_config/github-actions-generator/examples/triggers/chatops-commands.yml +475 -0
- package/skills/global_config/github-actions-generator/examples/triggers/repository-dispatch.yml +418 -0
- package/skills/global_config/github-actions-generator/examples/triggers/workflow-orchestration.yml +404 -0
- package/skills/global_config/github-actions-generator/examples/workflows/docker-build-push.yml +68 -0
- package/skills/global_config/github-actions-generator/examples/workflows/go-ci.yml +161 -0
- package/skills/global_config/github-actions-generator/examples/workflows/monorepo-ci.yml +340 -0
- package/skills/global_config/github-actions-generator/examples/workflows/multi-environment-deploy.yml +406 -0
- package/skills/global_config/github-actions-generator/examples/workflows/nodejs-ci.yml +122 -0
- package/skills/global_config/github-actions-generator/examples/workflows/python-ci.yml +157 -0
- package/skills/global_config/github-actions-generator/examples/workflows/scheduled-tasks.yml +376 -0
- package/skills/global_config/github-actions-generator/references/advanced-triggers.md +917 -0
- package/skills/global_config/github-actions-generator/references/best-practices.md +755 -0
- package/skills/global_config/github-actions-generator/references/common-actions.md +715 -0
- package/skills/global_config/github-actions-generator/references/custom-actions.md +320 -0
- package/skills/global_config/github-actions-generator/references/expressions-and-contexts.md +688 -0
- package/skills/global_config/github-actions-generator/references/modern-features.md +421 -0
- package/skills/global_config/github-actions-generator/scripts/test_generator.sh +344 -0
- package/skills/global_config/github-actions-templates/SKILL.md +7 -0
- package/skills/global_config/github-actions-validator/SKILL.md +576 -0
- package/skills/global_config/github-actions-validator/examples/README.md +88 -0
- package/skills/global_config/github-actions-validator/examples/outdated-versions.yml +76 -0
- package/skills/global_config/github-actions-validator/examples/valid-ci.yml +79 -0
- package/skills/global_config/github-actions-validator/examples/with-errors.yml +47 -0
- package/skills/global_config/github-actions-validator/references/act_usage.md +233 -0
- package/skills/global_config/github-actions-validator/references/action_versions.md +122 -0
- package/skills/global_config/github-actions-validator/references/actionlint_usage.md +343 -0
- package/skills/global_config/github-actions-validator/references/common_errors.md +512 -0
- package/skills/global_config/github-actions-validator/references/modern_features.md +384 -0
- package/skills/global_config/github-actions-validator/references/runners.md +317 -0
- package/skills/global_config/github-actions-validator/scripts/install_tools.sh +113 -0
- package/skills/global_config/github-actions-validator/scripts/validate_workflow.sh +910 -0
- package/skills/global_config/github-actions-validator/tests/test_validate_workflow.sh +237 -0
- package/skills/global_config/makefile-generator/SKILL.md +614 -0
- package/skills/global_config/makefile-generator/assets/templates/.gitkeep +1 -0
- package/skills/global_config/makefile-generator/docs/makefile-structure.md +530 -0
- package/skills/global_config/makefile-generator/docs/optimization-guide.md +784 -0
- package/skills/global_config/makefile-generator/docs/patterns-guide.md +642 -0
- package/skills/global_config/makefile-generator/docs/security-guide.md +361 -0
- package/skills/global_config/makefile-generator/docs/targets-guide.md +642 -0
- package/skills/global_config/makefile-generator/docs/variables-guide.md +596 -0
- package/skills/global_config/makefile-generator/scripts/add_standard_targets.sh +539 -0
- package/skills/global_config/makefile-generator/scripts/generate_makefile_template.sh +690 -0
- package/skills/global_config/makefile-generator/test/test_helper_scripts.sh +190 -0
- package/skills/global_config/makefile-validator/SKILL.md +244 -0
- package/skills/global_config/makefile-validator/docs/bake-tool.md +1000 -0
- package/skills/global_config/makefile-validator/docs/best-practices.md +858 -0
- package/skills/global_config/makefile-validator/docs/common-mistakes.md +944 -0
- package/skills/global_config/makefile-validator/examples/bad-makefile.mk +77 -0
- package/skills/global_config/makefile-validator/examples/good-makefile.mk +103 -0
- package/skills/global_config/makefile-validator/scripts/test_validate.sh +382 -0
- package/skills/global_config/makefile-validator/scripts/validate_makefile.sh +712 -0
- package/skills/global_config/{MCP_Manage → mcp-manage}/SKILL.md +3 -3
- package/skills/global_config/requesting-code-review/SKILL.md +98 -0
- package/skills/global_config/requesting-code-review/code-reviewer.md +198 -0
- package/skills/global_config/using-git-worktrees/SKILL.md +170 -0
- package/skills/global_config/verification-before-completion/SKILL.md +123 -0
- package/skills/global_config/writing-plans/SKILL.md +126 -46
- package/skills/global_config/writing-plans-legacy/SKILL.md +139 -0
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
# Common GitHub Actions Errors and Solutions
|
|
2
|
+
|
|
3
|
+
This reference lists common errors encountered when working with GitHub Actions and how to fix them.
|
|
4
|
+
|
|
5
|
+
## Syntax Errors
|
|
6
|
+
|
|
7
|
+
### 1. Invalid YAML Syntax
|
|
8
|
+
|
|
9
|
+
**Error:**
|
|
10
|
+
```
|
|
11
|
+
Error: Unable to process file command 'workflow' successfully.
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**Common Causes:**
|
|
15
|
+
- Incorrect indentation (YAML is whitespace-sensitive)
|
|
16
|
+
- Missing colons
|
|
17
|
+
- Unquoted strings containing special characters
|
|
18
|
+
- Tabs instead of spaces
|
|
19
|
+
|
|
20
|
+
**Fix:**
|
|
21
|
+
```yaml
|
|
22
|
+
# Bad
|
|
23
|
+
name:My Workflow
|
|
24
|
+
jobs:
|
|
25
|
+
build:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
|
|
28
|
+
# Good
|
|
29
|
+
name: My Workflow
|
|
30
|
+
jobs:
|
|
31
|
+
build:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2. Missing Required Fields
|
|
36
|
+
|
|
37
|
+
**Error:**
|
|
38
|
+
```
|
|
39
|
+
Required property is missing: name
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Fix:**
|
|
43
|
+
```yaml
|
|
44
|
+
# Every workflow needs a name
|
|
45
|
+
name: CI Pipeline
|
|
46
|
+
|
|
47
|
+
on: [push]
|
|
48
|
+
|
|
49
|
+
jobs:
|
|
50
|
+
build:
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 3. Invalid Workflow Triggers
|
|
57
|
+
|
|
58
|
+
**Error:**
|
|
59
|
+
```
|
|
60
|
+
The workflow is not valid. Unexpected value 'on'
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Fix:**
|
|
64
|
+
```yaml
|
|
65
|
+
# Bad - wrong event name
|
|
66
|
+
on:
|
|
67
|
+
pull-request: # Should be pull_request
|
|
68
|
+
|
|
69
|
+
# Good
|
|
70
|
+
on:
|
|
71
|
+
pull_request:
|
|
72
|
+
push:
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Expression Errors
|
|
76
|
+
|
|
77
|
+
### 1. Incorrect Expression Syntax
|
|
78
|
+
|
|
79
|
+
**Error:**
|
|
80
|
+
```
|
|
81
|
+
Unrecognized named-value: 'github'. Located at position 1 within expression: github.ref
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Fix:**
|
|
85
|
+
```yaml
|
|
86
|
+
# Bad - missing ${{ }}
|
|
87
|
+
if: github.ref == 'refs/heads/main'
|
|
88
|
+
|
|
89
|
+
# Good
|
|
90
|
+
if: ${{ github.ref == 'refs/heads/main' }}
|
|
91
|
+
|
|
92
|
+
# Even better (GitHub Actions auto-evaluates if conditions)
|
|
93
|
+
if: github.ref == 'refs/heads/main'
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 2. Type Mismatches
|
|
97
|
+
|
|
98
|
+
**Error:**
|
|
99
|
+
```
|
|
100
|
+
Expected boolean value, got string
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Fix:**
|
|
104
|
+
```yaml
|
|
105
|
+
# Bad
|
|
106
|
+
if: ${{ 'true' }} # String, not boolean
|
|
107
|
+
|
|
108
|
+
# Good
|
|
109
|
+
if: ${{ true }}
|
|
110
|
+
if: ${{ success() }}
|
|
111
|
+
if: ${{ github.event_name == 'push' }}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 3. Script Injection Vulnerabilities
|
|
115
|
+
|
|
116
|
+
**Warning:**
|
|
117
|
+
```
|
|
118
|
+
Potential script injection via untrusted input
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Fix:**
|
|
122
|
+
```yaml
|
|
123
|
+
# Bad - vulnerable to injection
|
|
124
|
+
run: echo ${{ github.event.issue.title }}
|
|
125
|
+
|
|
126
|
+
# Good - use environment variables
|
|
127
|
+
env:
|
|
128
|
+
TITLE: ${{ github.event.issue.title }}
|
|
129
|
+
run: echo "$TITLE"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Action Errors
|
|
133
|
+
|
|
134
|
+
### 1. Action Not Found
|
|
135
|
+
|
|
136
|
+
**Error:**
|
|
137
|
+
```
|
|
138
|
+
Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/_actions/actions/chekout/v4'
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Common Causes:**
|
|
142
|
+
- Typo in action name
|
|
143
|
+
- Invalid action reference
|
|
144
|
+
- Action doesn't exist or was removed
|
|
145
|
+
|
|
146
|
+
**Fix:**
|
|
147
|
+
```yaml
|
|
148
|
+
# Bad
|
|
149
|
+
- uses: actions/chekout@v4 # Typo
|
|
150
|
+
|
|
151
|
+
# Good
|
|
152
|
+
- uses: actions/checkout@v4
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### 2. Missing Required Inputs
|
|
156
|
+
|
|
157
|
+
**Error:**
|
|
158
|
+
```
|
|
159
|
+
Input required and not supplied: path
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Fix:**
|
|
163
|
+
```yaml
|
|
164
|
+
# Bad
|
|
165
|
+
- uses: some-action@v1
|
|
166
|
+
|
|
167
|
+
# Good
|
|
168
|
+
- uses: some-action@v1
|
|
169
|
+
with:
|
|
170
|
+
path: ./my-path
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### 3. Unknown Action Inputs
|
|
174
|
+
|
|
175
|
+
**Error:**
|
|
176
|
+
```
|
|
177
|
+
Unexpected input 'invalid_input'
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Fix:**
|
|
181
|
+
```yaml
|
|
182
|
+
# Check the action's documentation for valid inputs
|
|
183
|
+
- uses: actions/checkout@v4
|
|
184
|
+
with:
|
|
185
|
+
# Only use documented inputs
|
|
186
|
+
ref: main
|
|
187
|
+
# Remove undocumented inputs
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### 4. Deprecated Action Versions
|
|
191
|
+
|
|
192
|
+
**Warning:**
|
|
193
|
+
```
|
|
194
|
+
Node.js 12/16 actions are deprecated
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Fix:**
|
|
198
|
+
```yaml
|
|
199
|
+
# Deprecated - Node.js 12 (EOL April 2022)
|
|
200
|
+
- uses: actions/checkout@v2
|
|
201
|
+
|
|
202
|
+
# Deprecated - Node.js 16 (EOL September 2023)
|
|
203
|
+
- uses: actions/checkout@v3
|
|
204
|
+
|
|
205
|
+
# Older - Node.js 20 (EOL April 2026)
|
|
206
|
+
- uses: actions/checkout@v4
|
|
207
|
+
- uses: actions/checkout@v5
|
|
208
|
+
|
|
209
|
+
# Current - Node.js 20+/24 (v6)
|
|
210
|
+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
|
211
|
+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
|
212
|
+
|
|
213
|
+
# Note: Node.js 20 EOL is April 2026, Node.js 22 and 24 are current
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Job Configuration Errors
|
|
217
|
+
|
|
218
|
+
### 1. Invalid Runner Label
|
|
219
|
+
|
|
220
|
+
**Error:**
|
|
221
|
+
```
|
|
222
|
+
Unable to locate executable file: ubuntu-lastest
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Fix:**
|
|
226
|
+
```yaml
|
|
227
|
+
# Bad
|
|
228
|
+
runs-on: ubuntu-lastest # Typo
|
|
229
|
+
|
|
230
|
+
# Good
|
|
231
|
+
runs-on: ubuntu-latest
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Valid runner labels:
|
|
235
|
+
- `ubuntu-latest`, `ubuntu-22.04`, `ubuntu-20.04`
|
|
236
|
+
- `windows-latest`, `windows-2025`, `windows-2022`, `windows-2019`
|
|
237
|
+
- `macos-latest` (now macOS 15), `macos-15`, `macos-14`, `macos-26` (preview)
|
|
238
|
+
- `macos-13` (RETIRED November 14, 2025 - no longer available)
|
|
239
|
+
- `macos-15-intel`, `macos-15-large` (Intel x86_64, long-term deprecated)
|
|
240
|
+
- `macos-15-xlarge`, `macos-14-xlarge` (M2 Pro with GPU)
|
|
241
|
+
- `gpu-t4-4-core` (GPU runners for ML/AI)
|
|
242
|
+
- ARM64 runners (free for public repos)
|
|
243
|
+
|
|
244
|
+
### 2. Undefined Job Dependency
|
|
245
|
+
|
|
246
|
+
**Error:**
|
|
247
|
+
```
|
|
248
|
+
Job 'deploy' depends on job 'biuld' which does not exist
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Fix:**
|
|
252
|
+
```yaml
|
|
253
|
+
# Bad
|
|
254
|
+
jobs:
|
|
255
|
+
build:
|
|
256
|
+
runs-on: ubuntu-latest
|
|
257
|
+
deploy:
|
|
258
|
+
needs: biuld # Typo
|
|
259
|
+
|
|
260
|
+
# Good
|
|
261
|
+
jobs:
|
|
262
|
+
build:
|
|
263
|
+
runs-on: ubuntu-latest
|
|
264
|
+
deploy:
|
|
265
|
+
needs: build
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### 3. Circular Job Dependencies
|
|
269
|
+
|
|
270
|
+
**Error:**
|
|
271
|
+
```
|
|
272
|
+
Circular dependency detected
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**Fix:**
|
|
276
|
+
```yaml
|
|
277
|
+
# Bad
|
|
278
|
+
jobs:
|
|
279
|
+
job1:
|
|
280
|
+
needs: job2
|
|
281
|
+
job2:
|
|
282
|
+
needs: job1 # Circular!
|
|
283
|
+
|
|
284
|
+
# Good
|
|
285
|
+
jobs:
|
|
286
|
+
job1:
|
|
287
|
+
runs-on: ubuntu-latest
|
|
288
|
+
job2:
|
|
289
|
+
needs: job1
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Schedule Errors
|
|
293
|
+
|
|
294
|
+
### 1. Invalid CRON Syntax
|
|
295
|
+
|
|
296
|
+
**Error:**
|
|
297
|
+
```
|
|
298
|
+
Invalid CRON expression: '0 0 * * 8'
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Fix:**
|
|
302
|
+
```yaml
|
|
303
|
+
# Bad
|
|
304
|
+
schedule:
|
|
305
|
+
- cron: '0 0 * * 8' # Day 8 doesn't exist
|
|
306
|
+
|
|
307
|
+
# Good
|
|
308
|
+
schedule:
|
|
309
|
+
- cron: '0 0 * * 0' # Sunday
|
|
310
|
+
|
|
311
|
+
# CRON format: minute hour day month weekday
|
|
312
|
+
# Minute: 0-59
|
|
313
|
+
# Hour: 0-23
|
|
314
|
+
# Day: 1-31
|
|
315
|
+
# Month: 1-12
|
|
316
|
+
# Weekday: 0-6 (0 = Sunday)
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### 2. Multiple Schedule Entries
|
|
320
|
+
|
|
321
|
+
```yaml
|
|
322
|
+
# Correct way to define multiple schedules
|
|
323
|
+
on:
|
|
324
|
+
schedule:
|
|
325
|
+
- cron: '0 0 * * 1' # Monday at midnight
|
|
326
|
+
- cron: '0 12 * * 5' # Friday at noon
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## Path Filter Errors
|
|
330
|
+
|
|
331
|
+
### 1. Glob Pattern Best Practices
|
|
332
|
+
|
|
333
|
+
**Note:** `**.js` (double-star without a slash) is **not flagged by actionlint** as an error. GitHub's glob engine treats it similarly to `**/*.js`, but `**/*.js` is the conventional and explicit form. Prefer it for clarity.
|
|
334
|
+
|
|
335
|
+
```yaml
|
|
336
|
+
# Not recommended (ambiguous intent, but accepted by actionlint and GitHub)
|
|
337
|
+
on:
|
|
338
|
+
push:
|
|
339
|
+
paths:
|
|
340
|
+
- '**.js'
|
|
341
|
+
|
|
342
|
+
# Recommended (explicit and conventional)
|
|
343
|
+
on:
|
|
344
|
+
push:
|
|
345
|
+
paths:
|
|
346
|
+
- '**/*.js'
|
|
347
|
+
- 'src/**'
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## Environment and Secrets
|
|
351
|
+
|
|
352
|
+
### 1. Secret Not Found
|
|
353
|
+
|
|
354
|
+
**Error:**
|
|
355
|
+
```
|
|
356
|
+
Secret MY_SECRET not found
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Fix:**
|
|
360
|
+
- Ensure the secret is defined in repository settings
|
|
361
|
+
- Check secret name spelling (case-sensitive)
|
|
362
|
+
- Verify secret scope (repository vs organization vs environment)
|
|
363
|
+
|
|
364
|
+
```yaml
|
|
365
|
+
# Use secrets correctly
|
|
366
|
+
env:
|
|
367
|
+
API_KEY: ${{ secrets.MY_SECRET }} # Must match name in settings
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
### 2. Environment Variables in run
|
|
371
|
+
|
|
372
|
+
**Common Issue:**
|
|
373
|
+
```yaml
|
|
374
|
+
# Bad - environment variable not accessible
|
|
375
|
+
steps:
|
|
376
|
+
- run: echo $MY_VAR # May not work on Windows
|
|
377
|
+
|
|
378
|
+
# Good - use env
|
|
379
|
+
steps:
|
|
380
|
+
- name: Print variable
|
|
381
|
+
env:
|
|
382
|
+
MY_VAR: ${{ secrets.MY_SECRET }}
|
|
383
|
+
run: echo "$MY_VAR" # Unix
|
|
384
|
+
# or
|
|
385
|
+
run: echo $env:MY_VAR # Windows PowerShell
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
## Matrix Strategy Errors
|
|
389
|
+
|
|
390
|
+
### 1. Invalid Matrix Configuration
|
|
391
|
+
|
|
392
|
+
**Error:**
|
|
393
|
+
```
|
|
394
|
+
Matrix configuration is invalid
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
**Fix:**
|
|
398
|
+
```yaml
|
|
399
|
+
# Bad
|
|
400
|
+
strategy:
|
|
401
|
+
matrix:
|
|
402
|
+
os: ubuntu-latest # Should be an array
|
|
403
|
+
|
|
404
|
+
# Good
|
|
405
|
+
strategy:
|
|
406
|
+
matrix:
|
|
407
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
408
|
+
node: [20, 22, 24] # Node 16 EOL Sep 2023, Node 20 EOL Apr 2026
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### 2. Matrix Variable Reference
|
|
412
|
+
|
|
413
|
+
```yaml
|
|
414
|
+
# Correct way to reference matrix variables
|
|
415
|
+
strategy:
|
|
416
|
+
matrix:
|
|
417
|
+
os: [ubuntu-latest, windows-latest]
|
|
418
|
+
jobs:
|
|
419
|
+
test:
|
|
420
|
+
runs-on: ${{ matrix.os }}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
## Conditional Execution Errors
|
|
424
|
+
|
|
425
|
+
### 1. Always/Cancelled/Failure Conditions
|
|
426
|
+
|
|
427
|
+
```yaml
|
|
428
|
+
# Understanding conditions
|
|
429
|
+
steps:
|
|
430
|
+
- name: Run on success (default)
|
|
431
|
+
run: echo "Runs only if previous steps succeeded"
|
|
432
|
+
|
|
433
|
+
- name: Run always
|
|
434
|
+
if: always()
|
|
435
|
+
run: echo "Runs whether previous steps succeeded or failed"
|
|
436
|
+
|
|
437
|
+
- name: Run on failure
|
|
438
|
+
if: failure()
|
|
439
|
+
run: echo "Runs only if a previous step failed"
|
|
440
|
+
|
|
441
|
+
- name: Run on success
|
|
442
|
+
if: success()
|
|
443
|
+
run: echo "Runs only if all previous steps succeeded"
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
## Debugging Tips
|
|
447
|
+
|
|
448
|
+
### 1. Enable Debug Logging
|
|
449
|
+
|
|
450
|
+
Set secrets in repository settings:
|
|
451
|
+
- `ACTIONS_STEP_DEBUG` = `true` (detailed step logs)
|
|
452
|
+
- `ACTIONS_RUNNER_DEBUG` = `true` (runner diagnostic logs)
|
|
453
|
+
|
|
454
|
+
### 2. Use tmate for Interactive Debugging
|
|
455
|
+
|
|
456
|
+
```yaml
|
|
457
|
+
steps:
|
|
458
|
+
- name: Setup tmate session
|
|
459
|
+
if: failure()
|
|
460
|
+
uses: mxschmitt/action-tmate@v3
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### 3. Print Context Information
|
|
464
|
+
|
|
465
|
+
```yaml
|
|
466
|
+
steps:
|
|
467
|
+
- name: Dump GitHub context
|
|
468
|
+
run: echo '${{ toJSON(github) }}'
|
|
469
|
+
|
|
470
|
+
- name: Dump job context
|
|
471
|
+
run: echo '${{ toJSON(job) }}'
|
|
472
|
+
|
|
473
|
+
- name: Dump runner context
|
|
474
|
+
run: echo '${{ toJSON(runner) }}'
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
## Best Practices
|
|
478
|
+
|
|
479
|
+
1. **Always use specific action versions**: `actions/checkout@v6` not `actions/checkout@main`
|
|
480
|
+
2. **Quote strings with special characters**: `name: "My: Workflow"`
|
|
481
|
+
3. **Use shellcheck**: Enable shell script linting
|
|
482
|
+
4. **Validate locally**: Use act and actionlint before pushing
|
|
483
|
+
5. **Use env for secrets**: Never put secrets directly in run commands
|
|
484
|
+
6. **Keep workflows DRY**: Use reusable workflows and composite actions
|
|
485
|
+
7. **Set timeouts**: Prevent runaway jobs with `timeout-minutes`
|
|
486
|
+
8. **Use concurrency**: Cancel redundant runs with concurrency groups
|
|
487
|
+
|
|
488
|
+
```yaml
|
|
489
|
+
# Example of good practices
|
|
490
|
+
name: Production Deployment
|
|
491
|
+
|
|
492
|
+
on:
|
|
493
|
+
push:
|
|
494
|
+
branches: [main]
|
|
495
|
+
|
|
496
|
+
concurrency:
|
|
497
|
+
group: production
|
|
498
|
+
cancel-in-progress: false
|
|
499
|
+
|
|
500
|
+
jobs:
|
|
501
|
+
deploy:
|
|
502
|
+
runs-on: ubuntu-latest
|
|
503
|
+
timeout-minutes: 30
|
|
504
|
+
steps:
|
|
505
|
+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
|
506
|
+
|
|
507
|
+
- name: Deploy
|
|
508
|
+
env:
|
|
509
|
+
API_KEY: ${{ secrets.API_KEY }}
|
|
510
|
+
run: |
|
|
511
|
+
./deploy.sh
|
|
512
|
+
```
|