dojo.md 0.1.0 → 0.2.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.
Files changed (243) hide show
  1. package/courses/GENERATION_LOG.md +27 -0
  2. package/courses/api-error-handling/course.yaml +16 -0
  3. package/courses/api-error-handling/scenarios/level-1/error-response-format.yaml +131 -0
  4. package/courses/api-error-handling/scenarios/level-1/http-status-codes-basics.yaml +90 -0
  5. package/courses/api-error-handling/scenarios/level-1/rate-limiting-basics.yaml +135 -0
  6. package/courses/api-error-handling/scenarios/level-1/request-validation-errors.yaml +208 -0
  7. package/courses/api-error-handling/scenarios/level-2/circuit-breaker-pattern.yaml +189 -0
  8. package/courses/api-error-handling/scenarios/level-2/idempotency-retry-logic.yaml +159 -0
  9. package/courses/api-error-handling/scenarios/level-2/rfc-7807-problem-details.yaml +178 -0
  10. package/courses/api-error-handling/scenarios/level-2/webhook-error-handling.yaml +211 -0
  11. package/courses/api-error-handling/scenarios/level-3/distributed-tracing-errors.yaml +275 -0
  12. package/courses/github-actions-cicd/course.yaml +10 -0
  13. package/courses/github-actions-cicd/scenarios/level-1/actions-and-runners.yaml +58 -0
  14. package/courses/github-actions-cicd/scenarios/level-1/basic-workflow-syntax.yaml +52 -0
  15. package/courses/github-actions-cicd/scenarios/level-1/branch-protection-checks.yaml +63 -0
  16. package/courses/github-actions-cicd/scenarios/level-1/environment-variables-secrets.yaml +65 -0
  17. package/courses/github-actions-cicd/scenarios/level-1/first-cicd-shift.yaml +62 -0
  18. package/courses/github-actions-cicd/scenarios/level-1/job-dependencies-outputs.yaml +62 -0
  19. package/courses/github-actions-cicd/scenarios/level-1/simple-ci-pipeline.yaml +57 -0
  20. package/courses/github-actions-cicd/scenarios/level-1/workflow-debugging.yaml +90 -0
  21. package/courses/github-actions-cicd/scenarios/level-1/workflow-status-notifications.yaml +59 -0
  22. package/courses/github-actions-cicd/scenarios/level-1/workflow-triggers.yaml +56 -0
  23. package/courses/github-actions-cicd/scenarios/level-2/concurrency-control.yaml +58 -0
  24. package/courses/github-actions-cicd/scenarios/level-2/conditional-execution.yaml +60 -0
  25. package/courses/github-actions-cicd/scenarios/level-2/custom-actions-development.yaml +55 -0
  26. package/courses/github-actions-cicd/scenarios/level-2/dependency-caching.yaml +58 -0
  27. package/courses/github-actions-cicd/scenarios/level-2/deployment-workflows.yaml +61 -0
  28. package/courses/github-actions-cicd/scenarios/level-2/github-packages-publishing.yaml +59 -0
  29. package/courses/github-actions-cicd/scenarios/level-2/intermediate-cicd-shift.yaml +68 -0
  30. package/courses/github-actions-cicd/scenarios/level-2/matrix-builds.yaml +59 -0
  31. package/courses/github-actions-cicd/scenarios/level-2/reusable-workflows.yaml +61 -0
  32. package/courses/github-actions-cicd/scenarios/level-2/workflow-cost-optimization.yaml +61 -0
  33. package/courses/github-actions-cicd/scenarios/level-3/advanced-cicd-shift.yaml +64 -0
  34. package/courses/github-actions-cicd/scenarios/level-3/compliance-automation.yaml +68 -0
  35. package/courses/github-actions-cicd/scenarios/level-3/docker-action-development.yaml +65 -0
  36. package/courses/github-actions-cicd/scenarios/level-3/github-environments.yaml +65 -0
  37. package/courses/github-actions-cicd/scenarios/level-3/monorepo-ci.yaml +68 -0
  38. package/courses/github-actions-cicd/scenarios/level-3/oidc-cloud-deployments.yaml +55 -0
  39. package/courses/github-actions-cicd/scenarios/level-3/release-automation.yaml +61 -0
  40. package/courses/github-actions-cicd/scenarios/level-3/security-hardening.yaml +63 -0
  41. package/courses/github-actions-cicd/scenarios/level-3/self-hosted-runners.yaml +60 -0
  42. package/courses/github-actions-cicd/scenarios/level-3/workflow-optimization.yaml +59 -0
  43. package/courses/github-actions-cicd/scenarios/level-4/cicd-data-architecture.yaml +63 -0
  44. package/courses/github-actions-cicd/scenarios/level-4/cicd-economics-roi.yaml +63 -0
  45. package/courses/github-actions-cicd/scenarios/level-4/cicd-executive-communication.yaml +58 -0
  46. package/courses/github-actions-cicd/scenarios/level-4/cicd-incident-response.yaml +60 -0
  47. package/courses/github-actions-cicd/scenarios/level-4/cicd-org-design.yaml +59 -0
  48. package/courses/github-actions-cicd/scenarios/level-4/cicd-platform-architecture.yaml +63 -0
  49. package/courses/github-actions-cicd/scenarios/level-4/cicd-training-program.yaml +65 -0
  50. package/courses/github-actions-cicd/scenarios/level-4/cicd-vendor-evaluation.yaml +59 -0
  51. package/courses/github-actions-cicd/scenarios/level-4/enterprise-cicd-governance.yaml +55 -0
  52. package/courses/github-actions-cicd/scenarios/level-4/expert-cicd-shift.yaml +60 -0
  53. package/courses/github-actions-cicd/scenarios/level-5/cicd-ai-future.yaml +63 -0
  54. package/courses/github-actions-cicd/scenarios/level-5/cicd-behavioral-science.yaml +70 -0
  55. package/courses/github-actions-cicd/scenarios/level-5/cicd-board-strategy.yaml +56 -0
  56. package/courses/github-actions-cicd/scenarios/level-5/cicd-consulting-engagement.yaml +61 -0
  57. package/courses/github-actions-cicd/scenarios/level-5/cicd-industry-benchmarks.yaml +63 -0
  58. package/courses/github-actions-cicd/scenarios/level-5/cicd-ma-integration.yaml +73 -0
  59. package/courses/github-actions-cicd/scenarios/level-5/cicd-product-development.yaml +68 -0
  60. package/courses/github-actions-cicd/scenarios/level-5/cicd-regulatory-landscape.yaml +72 -0
  61. package/courses/github-actions-cicd/scenarios/level-5/comprehensive-cicd-system.yaml +66 -0
  62. package/courses/github-actions-cicd/scenarios/level-5/master-cicd-shift.yaml +76 -0
  63. package/courses/github-pr-review/scenarios/level-2/api-change-review.yaml +82 -0
  64. package/courses/github-pr-review/scenarios/level-2/automated-review-tooling.yaml +53 -0
  65. package/courses/github-pr-review/scenarios/level-2/cross-team-review.yaml +61 -0
  66. package/courses/github-pr-review/scenarios/level-2/intermediate-review-shift.yaml +66 -0
  67. package/courses/github-pr-review/scenarios/level-2/performance-review-patterns.yaml +99 -0
  68. package/courses/github-pr-review/scenarios/level-2/review-disagreement-resolution.yaml +64 -0
  69. package/courses/github-pr-review/scenarios/level-2/review-metrics-analysis.yaml +63 -0
  70. package/courses/github-pr-review/scenarios/level-2/review-turnaround-sla.yaml +54 -0
  71. package/courses/github-pr-review/scenarios/level-2/stacked-pr-review.yaml +65 -0
  72. package/courses/github-pr-review/scenarios/level-3/advanced-review-shift.yaml +65 -0
  73. package/courses/github-pr-review/scenarios/level-3/ai-powered-review.yaml +58 -0
  74. package/courses/github-pr-review/scenarios/level-3/compliance-review-process.yaml +64 -0
  75. package/courses/github-pr-review/scenarios/level-3/cross-functional-review.yaml +60 -0
  76. package/courses/github-pr-review/scenarios/level-3/incident-driven-review.yaml +63 -0
  77. package/courses/github-pr-review/scenarios/level-3/large-scale-review-operations.yaml +55 -0
  78. package/courses/github-pr-review/scenarios/level-3/monorepo-review-process.yaml +68 -0
  79. package/courses/github-pr-review/scenarios/level-3/review-automation-platform.yaml +61 -0
  80. package/courses/github-pr-review/scenarios/level-3/review-culture-design.yaml +62 -0
  81. package/courses/github-pr-review/scenarios/level-3/review-data-pipeline.yaml +62 -0
  82. package/courses/github-pr-review/scenarios/level-4/enterprise-review-operations.yaml +61 -0
  83. package/courses/github-pr-review/scenarios/level-4/expert-review-shift.yaml +62 -0
  84. package/courses/github-pr-review/scenarios/level-4/review-data-architecture.yaml +69 -0
  85. package/courses/github-pr-review/scenarios/level-4/review-economics-roi.yaml +63 -0
  86. package/courses/github-pr-review/scenarios/level-4/review-executive-communication.yaml +61 -0
  87. package/courses/github-pr-review/scenarios/level-4/review-incident-postmortem.yaml +69 -0
  88. package/courses/github-pr-review/scenarios/level-4/review-org-design.yaml +62 -0
  89. package/courses/github-pr-review/scenarios/level-4/review-platform-architecture.yaml +64 -0
  90. package/courses/github-pr-review/scenarios/level-4/review-training-program.yaml +66 -0
  91. package/courses/github-pr-review/scenarios/level-4/review-vendor-evaluation.yaml +76 -0
  92. package/courses/github-pr-review/scenarios/level-5/comprehensive-review-system.yaml +68 -0
  93. package/courses/github-pr-review/scenarios/level-5/master-review-shift.yaml +73 -0
  94. package/courses/github-pr-review/scenarios/level-5/review-ai-future.yaml +69 -0
  95. package/courses/github-pr-review/scenarios/level-5/review-behavioral-science.yaml +66 -0
  96. package/courses/github-pr-review/scenarios/level-5/review-board-strategy.yaml +62 -0
  97. package/courses/github-pr-review/scenarios/level-5/review-consulting-engagement.yaml +62 -0
  98. package/courses/github-pr-review/scenarios/level-5/review-devtools-product.yaml +71 -0
  99. package/courses/github-pr-review/scenarios/level-5/review-industry-benchmarks.yaml +64 -0
  100. package/courses/github-pr-review/scenarios/level-5/review-ma-integration.yaml +76 -0
  101. package/courses/github-pr-review/scenarios/level-5/review-regulatory-landscape.yaml +78 -0
  102. package/courses/postgresql-query-optimization/course.yaml +11 -0
  103. package/courses/postgresql-query-optimization/scenarios/level-1/explain-analyze-basics.yaml +80 -0
  104. package/courses/postgresql-query-optimization/scenarios/level-1/first-optimization-shift.yaml +77 -0
  105. package/courses/postgresql-query-optimization/scenarios/level-1/index-fundamentals.yaml +76 -0
  106. package/courses/postgresql-query-optimization/scenarios/level-1/join-basics.yaml +73 -0
  107. package/courses/postgresql-query-optimization/scenarios/level-1/n-plus-one-queries.yaml +62 -0
  108. package/courses/postgresql-query-optimization/scenarios/level-1/query-rewriting-basics.yaml +69 -0
  109. package/courses/postgresql-query-optimization/scenarios/level-1/select-star-problems.yaml +69 -0
  110. package/courses/postgresql-query-optimization/scenarios/level-1/slow-query-diagnosis.yaml +63 -0
  111. package/courses/postgresql-query-optimization/scenarios/level-1/vacuum-and-statistics.yaml +62 -0
  112. package/courses/postgresql-query-optimization/scenarios/level-1/where-clause-optimization.yaml +74 -0
  113. package/courses/postgresql-query-optimization/scenarios/level-2/autovacuum-tuning.yaml +76 -0
  114. package/courses/postgresql-query-optimization/scenarios/level-2/composite-index-design.yaml +81 -0
  115. package/courses/postgresql-query-optimization/scenarios/level-2/covering-indexes.yaml +74 -0
  116. package/courses/postgresql-query-optimization/scenarios/level-2/cte-optimization.yaml +83 -0
  117. package/courses/postgresql-query-optimization/scenarios/level-2/intermediate-optimization-shift.yaml +66 -0
  118. package/courses/postgresql-query-optimization/scenarios/level-2/join-optimization.yaml +72 -0
  119. package/courses/postgresql-query-optimization/scenarios/level-2/partial-and-expression-indexes.yaml +75 -0
  120. package/courses/postgresql-query-optimization/scenarios/level-2/query-planner-settings.yaml +62 -0
  121. package/courses/postgresql-query-optimization/scenarios/level-2/subquery-optimization.yaml +67 -0
  122. package/courses/postgresql-query-optimization/scenarios/level-2/window-function-optimization.yaml +63 -0
  123. package/courses/postgresql-query-optimization/scenarios/level-3/advanced-optimization-shift.yaml +71 -0
  124. package/courses/postgresql-query-optimization/scenarios/level-3/connection-pooling.yaml +60 -0
  125. package/courses/postgresql-query-optimization/scenarios/level-3/full-text-search-optimization.yaml +66 -0
  126. package/courses/postgresql-query-optimization/scenarios/level-3/jsonb-optimization.yaml +88 -0
  127. package/courses/postgresql-query-optimization/scenarios/level-3/lock-contention-analysis.yaml +80 -0
  128. package/courses/postgresql-query-optimization/scenarios/level-3/materialized-view-optimization.yaml +73 -0
  129. package/courses/postgresql-query-optimization/scenarios/level-3/parallel-query-execution.yaml +74 -0
  130. package/courses/postgresql-query-optimization/scenarios/level-3/partitioning-strategies.yaml +71 -0
  131. package/courses/postgresql-query-optimization/scenarios/level-3/specialized-index-types.yaml +67 -0
  132. package/courses/postgresql-query-optimization/scenarios/level-3/write-optimization.yaml +65 -0
  133. package/courses/postgresql-query-optimization/scenarios/level-4/data-architecture-analytics.yaml +64 -0
  134. package/courses/postgresql-query-optimization/scenarios/level-4/database-executive-communication.yaml +64 -0
  135. package/courses/postgresql-query-optimization/scenarios/level-4/database-migration-planning.yaml +57 -0
  136. package/courses/postgresql-query-optimization/scenarios/level-4/enterprise-database-governance.yaml +52 -0
  137. package/courses/postgresql-query-optimization/scenarios/level-4/expert-optimization-shift.yaml +73 -0
  138. package/courses/postgresql-query-optimization/scenarios/level-4/high-availability-architecture.yaml +62 -0
  139. package/courses/postgresql-query-optimization/scenarios/level-4/optimizer-internals.yaml +69 -0
  140. package/courses/postgresql-query-optimization/scenarios/level-4/performance-sla-design.yaml +58 -0
  141. package/courses/postgresql-query-optimization/scenarios/level-4/read-replica-optimization.yaml +62 -0
  142. package/courses/postgresql-query-optimization/scenarios/level-4/vendor-evaluation.yaml +73 -0
  143. package/courses/rest-api-error-handling/course.yaml +11 -0
  144. package/courses/rest-api-error-handling/scenarios/level-1/authentication-errors.yaml +71 -0
  145. package/courses/rest-api-error-handling/scenarios/level-1/content-negotiation-errors.yaml +63 -0
  146. package/courses/rest-api-error-handling/scenarios/level-1/error-logging-basics.yaml +63 -0
  147. package/courses/rest-api-error-handling/scenarios/level-1/error-response-format.yaml +58 -0
  148. package/courses/rest-api-error-handling/scenarios/level-1/first-error-handling-shift.yaml +67 -0
  149. package/courses/rest-api-error-handling/scenarios/level-1/http-status-codes.yaml +46 -0
  150. package/courses/rest-api-error-handling/scenarios/level-1/not-found-errors.yaml +52 -0
  151. package/courses/rest-api-error-handling/scenarios/level-1/rate-limiting-errors.yaml +56 -0
  152. package/courses/rest-api-error-handling/scenarios/level-1/request-validation-errors.yaml +59 -0
  153. package/courses/rest-api-error-handling/scenarios/level-1/server-error-handling.yaml +55 -0
  154. package/courses/rest-api-error-handling/scenarios/level-2/api-versioning-errors.yaml +66 -0
  155. package/courses/rest-api-error-handling/scenarios/level-2/batch-request-errors.yaml +61 -0
  156. package/courses/rest-api-error-handling/scenarios/level-2/circuit-breaker-pattern.yaml +52 -0
  157. package/courses/rest-api-error-handling/scenarios/level-2/error-code-taxonomy.yaml +62 -0
  158. package/courses/rest-api-error-handling/scenarios/level-2/error-monitoring-alerting.yaml +53 -0
  159. package/courses/rest-api-error-handling/scenarios/level-2/intermediate-error-shift.yaml +69 -0
  160. package/courses/rest-api-error-handling/scenarios/level-2/pagination-errors.yaml +66 -0
  161. package/courses/rest-api-error-handling/scenarios/level-2/retry-and-idempotency.yaml +60 -0
  162. package/courses/rest-api-error-handling/scenarios/level-2/rfc7807-problem-details.yaml +60 -0
  163. package/courses/rest-api-error-handling/scenarios/level-2/webhook-error-handling.yaml +55 -0
  164. package/courses/rest-api-error-handling/scenarios/level-3/advanced-error-shift.yaml +72 -0
  165. package/courses/rest-api-error-handling/scenarios/level-3/api-gateway-errors.yaml +71 -0
  166. package/courses/rest-api-error-handling/scenarios/level-3/async-api-errors.yaml +67 -0
  167. package/courses/rest-api-error-handling/scenarios/level-3/caching-error-scenarios.yaml +65 -0
  168. package/courses/rest-api-error-handling/scenarios/level-3/chaos-engineering-apis.yaml +62 -0
  169. package/courses/rest-api-error-handling/scenarios/level-3/database-error-handling.yaml +79 -0
  170. package/courses/rest-api-error-handling/scenarios/level-3/distributed-error-propagation.yaml +63 -0
  171. package/courses/rest-api-error-handling/scenarios/level-3/error-budgets-sre.yaml +61 -0
  172. package/courses/rest-api-error-handling/scenarios/level-3/error-correlation.yaml +58 -0
  173. package/courses/rest-api-error-handling/scenarios/level-3/graphql-vs-rest-errors.yaml +73 -0
  174. package/courses/rest-api-error-handling/scenarios/level-4/compliance-error-handling.yaml +65 -0
  175. package/courses/rest-api-error-handling/scenarios/level-4/enterprise-error-governance.yaml +62 -0
  176. package/courses/rest-api-error-handling/scenarios/level-4/error-analytics-platform.yaml +65 -0
  177. package/courses/rest-api-error-handling/scenarios/level-4/error-cost-optimization.yaml +63 -0
  178. package/courses/rest-api-error-handling/scenarios/level-4/error-executive-communication.yaml +60 -0
  179. package/courses/rest-api-error-handling/scenarios/level-4/error-handling-architecture.yaml +67 -0
  180. package/courses/rest-api-error-handling/scenarios/level-4/error-org-design.yaml +68 -0
  181. package/courses/rest-api-error-handling/scenarios/level-4/error-sla-design.yaml +65 -0
  182. package/courses/rest-api-error-handling/scenarios/level-4/error-training-program.yaml +61 -0
  183. package/courses/rest-api-error-handling/scenarios/level-4/expert-error-shift.yaml +63 -0
  184. package/courses/rest-api-error-handling/scenarios/level-5/comprehensive-error-system.yaml +68 -0
  185. package/courses/rest-api-error-handling/scenarios/level-5/error-ai-future.yaml +75 -0
  186. package/courses/rest-api-error-handling/scenarios/level-5/error-behavioral-science.yaml +73 -0
  187. package/courses/rest-api-error-handling/scenarios/level-5/error-board-strategy.yaml +60 -0
  188. package/courses/rest-api-error-handling/scenarios/level-5/error-consulting-engagement.yaml +58 -0
  189. package/courses/rest-api-error-handling/scenarios/level-5/error-industry-benchmarks.yaml +72 -0
  190. package/courses/rest-api-error-handling/scenarios/level-5/error-ma-integration.yaml +68 -0
  191. package/courses/rest-api-error-handling/scenarios/level-5/error-product-development.yaml +66 -0
  192. package/courses/rest-api-error-handling/scenarios/level-5/error-regulatory-landscape.yaml +80 -0
  193. package/courses/rest-api-error-handling/scenarios/level-5/master-error-shift.yaml +73 -0
  194. package/dist/cli/commands/add.d.ts.map +1 -1
  195. package/dist/cli/commands/add.js +6 -5
  196. package/dist/cli/commands/add.js.map +1 -1
  197. package/dist/cli/commands/generate.d.ts.map +1 -1
  198. package/dist/cli/commands/generate.js +4 -0
  199. package/dist/cli/commands/generate.js.map +1 -1
  200. package/dist/cli/commands/list.d.ts.map +1 -1
  201. package/dist/cli/commands/list.js +6 -18
  202. package/dist/cli/commands/list.js.map +1 -1
  203. package/dist/cli/commands/train.d.ts.map +1 -1
  204. package/dist/cli/commands/train.js +18 -18
  205. package/dist/cli/commands/train.js.map +1 -1
  206. package/dist/cli/index.js +93 -55
  207. package/dist/cli/index.js.map +1 -1
  208. package/dist/cli/run-demo.js +2 -1
  209. package/dist/cli/run-demo.js.map +1 -1
  210. package/dist/cli/setup.d.ts +18 -0
  211. package/dist/cli/setup.d.ts.map +1 -0
  212. package/dist/cli/setup.js +154 -0
  213. package/dist/cli/setup.js.map +1 -0
  214. package/dist/engine/agent-bridge.d.ts +5 -2
  215. package/dist/engine/agent-bridge.d.ts.map +1 -1
  216. package/dist/engine/agent-bridge.js +36 -9
  217. package/dist/engine/agent-bridge.js.map +1 -1
  218. package/dist/engine/loader.d.ts +21 -0
  219. package/dist/engine/loader.d.ts.map +1 -1
  220. package/dist/engine/loader.js +54 -1
  221. package/dist/engine/loader.js.map +1 -1
  222. package/dist/engine/training-loop.d.ts.map +1 -1
  223. package/dist/engine/training-loop.js +1 -0
  224. package/dist/engine/training-loop.js.map +1 -1
  225. package/dist/engine/training.d.ts.map +1 -1
  226. package/dist/engine/training.js +1 -0
  227. package/dist/engine/training.js.map +1 -1
  228. package/dist/generator/skill-generator.d.ts +1 -1
  229. package/dist/generator/skill-generator.d.ts.map +1 -1
  230. package/dist/generator/skill-generator.js +21 -2
  231. package/dist/generator/skill-generator.js.map +1 -1
  232. package/dist/mcp/server.d.ts.map +1 -1
  233. package/dist/mcp/server.js +11 -26
  234. package/dist/mcp/server.js.map +1 -1
  235. package/dist/mcp/session-manager.d.ts +3 -1
  236. package/dist/mcp/session-manager.d.ts.map +1 -1
  237. package/dist/mcp/session-manager.js +44 -22
  238. package/dist/mcp/session-manager.js.map +1 -1
  239. package/dist/types/schemas.d.ts +38 -13
  240. package/dist/types/schemas.d.ts.map +1 -1
  241. package/dist/types/schemas.js +9 -5
  242. package/dist/types/schemas.js.map +1 -1
  243. package/package.json +1 -1
@@ -0,0 +1,65 @@
1
+ meta:
2
+ id: environment-variables-secrets
3
+ level: 1
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Manage environment variables and secrets — configure secrets, env vars, and contexts safely in GitHub Actions workflows"
7
+ tags: [github, actions, secrets, environment-variables, security, basics]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're setting up environment variables and secrets for a project
13
+ that deploys to AWS and uses a PostgreSQL database. The team has
14
+ been hardcoding values in their workflows and you need to fix this.
15
+
16
+ Current (insecure) workflow snippet:
17
+ ```yaml
18
+ jobs:
19
+ deploy:
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - run: |
23
+ export AWS_ACCESS_KEY_ID=AKIA1234567890
24
+ export AWS_SECRET_ACCESS_KEY=wJalr+secret+key
25
+ export DATABASE_URL=postgres://admin:password123@db.example.com/prod
26
+ npm run deploy
27
+ ```
28
+
29
+ Requirements:
30
+ 1. Move all sensitive values to GitHub Secrets
31
+ 2. Use repository-level secrets for AWS credentials
32
+ 3. Use environment-level secrets for database URLs (different per
33
+ environment: staging vs production)
34
+ 4. Set non-sensitive configuration as environment variables (NODE_ENV,
35
+ LOG_LEVEL, APP_VERSION)
36
+ 5. Make the GitHub Actions run number available as APP_VERSION
37
+ 6. Explain the secret masking behavior (what happens if a secret
38
+ is accidentally printed to logs)
39
+
40
+ Your teammate asks:
41
+ - "What's the difference between repository secrets, environment
42
+ secrets, and organization secrets?"
43
+ - "Can I use secrets in if: conditions or as part of action inputs?"
44
+ - "How do I pass secrets to a Docker container step?"
45
+ - "What happens if I fork a repo — can the fork access the secrets?"
46
+
47
+ Task: Rewrite the workflow to use secrets and environment variables
48
+ correctly. Show: the GitHub Secrets configuration needed (which
49
+ secrets at which level), the corrected workflow YAML, the answers
50
+ to all 4 teammate questions, and a security checklist for secrets
51
+ in GitHub Actions.
52
+
53
+ assertions:
54
+ - type: llm_judge
55
+ criteria: "Secrets are correctly configured — AWS credentials use repository or organization secrets (secrets.AWS_ACCESS_KEY_ID), database URLs use environment-level secrets, the workflow references secrets with ${{ secrets.NAME }} syntax, and no hardcoded sensitive values remain"
56
+ weight: 0.35
57
+ description: "Correct secrets configuration"
58
+ - type: llm_judge
59
+ criteria: "All 4 questions are answered accurately — explains the 3 secret scopes (repo/env/org) with inheritance rules, limitations of secrets in if: conditions, env: for Docker container steps, and fork security (secrets not available to forks in PRs from forks)"
60
+ weight: 0.35
61
+ description: "Accurate question answers"
62
+ - type: llm_judge
63
+ criteria: "Security best practices are covered — secret masking behavior, the GITHUB_TOKEN automatic secret, least-privilege principle for secrets, rotation strategy, and the security checklist includes at least 5 actionable items"
64
+ weight: 0.30
65
+ description: "Security best practices"
@@ -0,0 +1,62 @@
1
+ meta:
2
+ id: first-cicd-shift
3
+ level: 1
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "First CI/CD shift — handle a batch of CI/CD setup tasks and troubleshooting requests as the team's GitHub Actions go-to person"
7
+ tags: [github, actions, shift-simulation, troubleshooting, batch, basics]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're the designated GitHub Actions person for your team this week.
13
+ You have 5 requests to handle.
14
+
15
+ Request 1 — New project setup (from the tech lead):
16
+ "We're starting a new Python project (FastAPI + PostgreSQL). Need a
17
+ basic CI workflow: lint with ruff, type-check with mypy, test with
18
+ pytest, and build a Docker image. Use Python 3.12. We also need
19
+ PostgreSQL as a service container for integration tests."
20
+
21
+ Request 2 — Flaky test investigation (from a frustrated developer):
22
+ "My E2E tests pass locally but fail randomly in CI. About 30% of
23
+ the time. The error is always 'connection refused' when trying to
24
+ reach the API server. The workflow starts the server with
25
+ 'npm start &' and immediately runs tests. I think it's a timing
26
+ issue."
27
+
28
+ Request 3 — Cost optimization (from the engineering manager):
29
+ "Our GitHub Actions bill jumped from $200 to $800 this month. Can
30
+ you figure out why and fix it? I see we have 15 workflows and some
31
+ run on every push to every branch."
32
+
33
+ Request 4 — Secret rotation (from the security team):
34
+ "We're rotating all AWS credentials. Please update the GitHub Secrets
35
+ and make sure the deployment workflow uses the new credentials
36
+ without any downtime. Also, we found that the old credentials are
37
+ hardcoded in a workflow file. Remove them."
38
+
39
+ Request 5 — Status badge request (from the PM):
40
+ "Can you add a CI status badge to our README? Also, the deploys page
41
+ should show the current deployed version. Can GitHub Actions help
42
+ with that?"
43
+
44
+ Task: Handle all 5 requests. For each, write: the solution (workflow
45
+ YAML, configuration, or investigation steps), the explanation (so
46
+ the requester understands what you did), and any follow-up
47
+ recommendations. Prioritize the requests by urgency and explain
48
+ your prioritization.
49
+
50
+ assertions:
51
+ - type: llm_judge
52
+ criteria: "Priority order is sensible — secret rotation (security) and flaky test (blocking developer) are higher priority than cost optimization and badge requests. The hardcoded credentials in Request 4 are flagged as critical"
53
+ weight: 0.35
54
+ description: "Sensible priority order"
55
+ - type: llm_judge
56
+ criteria: "Solutions are technically correct — Python CI workflow uses correct setup-python and service container syntax, flaky test fix uses wait-for-it or health check before running tests, cost optimization identifies unnecessary triggers and suggests path filters/concurrency"
57
+ weight: 0.35
58
+ description: "Technically correct solutions"
59
+ - type: llm_judge
60
+ criteria: "Explanations are accessible — each response is written for the specific requester's context (tech lead gets YAML, frustrated developer gets root cause, manager gets cost breakdown, security gets rotation procedure, PM gets badge markdown)"
61
+ weight: 0.30
62
+ description: "Context-appropriate explanations"
@@ -0,0 +1,62 @@
1
+ meta:
2
+ id: job-dependencies-outputs
3
+ level: 1
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Configure job dependencies and outputs — use needs, outputs, and conditional execution to create structured workflow graphs"
7
+ tags: [github, actions, jobs, needs, outputs, conditional, basics]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're building a deployment workflow that requires careful job
13
+ orchestration. Different jobs need to pass data to each other and
14
+ execute conditionally.
15
+
16
+ Workflow requirements:
17
+ 1. Job: "determine-changes" — Detect what changed in the PR
18
+ - Output: "backend_changed" (true/false)
19
+ - Output: "frontend_changed" (true/false)
20
+ - Output: "infra_changed" (true/false)
21
+ - Uses git diff to check which directories have changes
22
+
23
+ 2. Job: "test-backend" — Only runs if backend code changed
24
+ - Needs: determine-changes
25
+ - Condition: only if backend_changed == 'true'
26
+ - Output: "test_status" (passed/failed)
27
+
28
+ 3. Job: "test-frontend" — Only runs if frontend code changed
29
+ - Needs: determine-changes
30
+ - Condition: only if frontend_changed == 'true'
31
+ - Output: "test_status" (passed/failed)
32
+
33
+ 4. Job: "deploy" — Runs only if relevant tests passed
34
+ - Needs: test-backend AND test-frontend
35
+ - Should run even if one of the test jobs was skipped (because
36
+ that directory didn't change)
37
+ - Should NOT run if any test job actually failed
38
+
39
+ 5. Job: "notify" — Always runs, even if previous jobs fail
40
+ - Reports the final status to Slack
41
+ - Needs access to outputs from all previous jobs
42
+
43
+ Task: Write the complete workflow YAML. Explain: how to set and
44
+ read job outputs (the $GITHUB_OUTPUT syntax), how 'needs' creates
45
+ the dependency graph, how 'if' conditions work with job outputs and
46
+ status functions (success(), failure(), always(), cancelled()), and
47
+ the tricky behavior when a needed job is skipped (the deploy job
48
+ scenario).
49
+
50
+ assertions:
51
+ - type: llm_judge
52
+ criteria: "Job outputs are correctly configured — uses echo 'key=value' >> $GITHUB_OUTPUT syntax, outputs are declared in job-level outputs section, and downstream jobs reference them correctly with needs.<job>.outputs.<name>"
53
+ weight: 0.35
54
+ description: "Correct job output configuration"
55
+ - type: llm_judge
56
+ criteria: "Conditional execution handles the tricky cases — the deploy job runs when tests pass OR are skipped (not failed), using the correct combination of if: conditions and status check functions. The notify job uses if: always() to run regardless"
57
+ weight: 0.35
58
+ description: "Correct conditional execution"
59
+ - type: llm_judge
60
+ criteria: "Explanations clarify confusing behaviors — explains that skipped jobs cause downstream 'needs' jobs to also skip by default, how to use 'if: always()' or '!cancelled()' to override, and the difference between a job being skipped vs failing"
61
+ weight: 0.30
62
+ description: "Clear behavior explanations"
@@ -0,0 +1,57 @@
1
+ meta:
2
+ id: simple-ci-pipeline
3
+ level: 1
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Build a simple CI pipeline — create a complete lint, test, and build pipeline with proper job dependencies and failure handling"
7
+ tags: [github, actions, CI, pipeline, lint, test, build, basics]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're creating a CI pipeline for a React + TypeScript project.
13
+ The pipeline should catch issues before code is merged to main.
14
+
15
+ Project setup:
16
+ - React 18 with TypeScript
17
+ - ESLint for linting
18
+ - Jest for unit tests
19
+ - Cypress for E2E tests (runs against a dev server)
20
+ - Vite for building
21
+
22
+ Pipeline requirements:
23
+ 1. Lint job: Run ESLint and TypeScript type checking
24
+ 2. Unit test job: Run Jest with coverage report
25
+ 3. E2E test job: Start dev server, run Cypress tests, upload
26
+ screenshots on failure
27
+ 4. Build job: Only run if lint and unit tests pass
28
+ 5. The E2E tests should run in parallel with (not blocked by) the
29
+ build job
30
+ 6. If any job fails, the PR should show a red status check
31
+ 7. Cache node_modules to speed up subsequent runs
32
+
33
+ Additional context:
34
+ - The team currently runs everything locally before pushing, but
35
+ developers sometimes skip steps. The CI should be the safety net.
36
+ - E2E tests are flaky — about 10% failure rate. The team wants to
37
+ retry failed E2E tests once before marking as failed.
38
+
39
+ Task: Write the complete CI workflow. Include: the workflow YAML with
40
+ all 4 jobs and proper dependencies (needs), the caching configuration
41
+ for node_modules, the E2E test configuration with retry and failure
42
+ artifact upload, and an explanation of the job dependency graph
43
+ (which jobs run in parallel, which are sequential).
44
+
45
+ assertions:
46
+ - type: llm_judge
47
+ criteria: "Job dependencies are correct — lint and unit tests can run in parallel, build needs lint + unit tests to pass, E2E runs independently or after lint, and the dependency graph is explicitly explained with a visual or textual representation"
48
+ weight: 0.35
49
+ description: "Correct job dependencies"
50
+ - type: llm_judge
51
+ criteria: "Caching and retry are properly configured — uses actions/cache or setup-node cache for node_modules with correct cache key (hash of package-lock.json), E2E test step has retry logic (either via Cypress retry or step-level continue-on-error with re-run), and failure artifacts are uploaded"
52
+ weight: 0.35
53
+ description: "Proper caching and retry configuration"
54
+ - type: llm_judge
55
+ criteria: "Pipeline is practical and complete — all 4 jobs have correct steps, the E2E test starts a dev server before running Cypress, coverage reports are generated, and the workflow would work in a real React + TypeScript project without modification"
56
+ weight: 0.30
57
+ description: "Practical complete pipeline"
@@ -0,0 +1,90 @@
1
+ meta:
2
+ id: workflow-debugging
3
+ level: 1
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Debug GitHub Actions workflows — diagnose and fix common workflow failures, read logs effectively, and use debug mode"
7
+ tags: [github, actions, debugging, troubleshooting, logs, basics]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're helping a junior developer debug their first GitHub Actions
13
+ workflow. They've hit 5 different errors and can't figure out what's
14
+ wrong. For each error, diagnose the problem and provide the fix.
15
+
16
+ Error 1 — Workflow not triggering:
17
+ "I pushed to my feature branch but the workflow didn't run at all.
18
+ No entry in the Actions tab."
19
+ Their trigger config:
20
+ ```yaml
21
+ on:
22
+ push:
23
+ branches: [main]
24
+ pull_request:
25
+ branches: [main]
26
+ ```
27
+ They pushed to the branch 'feature/login' without opening a PR.
28
+
29
+ Error 2 — Permission denied:
30
+ ```
31
+ Error: HttpError: Resource not accessible by integration
32
+ ```
33
+ Their workflow tries to comment on a PR using the GITHUB_TOKEN.
34
+ The workflow is triggered by pull_request from a fork.
35
+
36
+ Error 3 — Action not found:
37
+ ```
38
+ Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile'
39
+ under '/home/runner/work/_actions/actions/setup-node/4'
40
+ ```
41
+ Their step: `uses: actions/setup-node@4` (missing the 'v' prefix)
42
+
43
+ Error 4 — Cache miss every time:
44
+ "My workflow takes 8 minutes because npm install runs fresh every
45
+ time. I added caching but it never hits."
46
+ ```yaml
47
+ - uses: actions/cache@v4
48
+ with:
49
+ path: node_modules
50
+ key: npm-${{ hashFiles('package.json') }}
51
+ ```
52
+ The issue: they're hashing package.json not package-lock.json.
53
+
54
+ Error 5 — Job output not available:
55
+ "My second job can't read the output from my first job. It's always
56
+ empty."
57
+ ```yaml
58
+ jobs:
59
+ build:
60
+ runs-on: ubuntu-latest
61
+ steps:
62
+ - run: echo "version=1.2.3" >> $GITHUB_OUTPUT
63
+ deploy:
64
+ needs: build
65
+ runs-on: ubuntu-latest
66
+ steps:
67
+ - run: echo "Deploying ${{ needs.build.outputs.version }}"
68
+ ```
69
+ They forgot to declare outputs at the job level.
70
+
71
+ Task: For each error, write: the diagnosis (what went wrong and why),
72
+ the fix (corrected YAML or configuration), the prevention strategy
73
+ (how to avoid this in the future), and the debugging technique (how
74
+ to find this type of error faster). Include a general GitHub Actions
75
+ debugging guide covering: enabling debug logging, reading workflow
76
+ run logs effectively, and the act tool for local testing.
77
+
78
+ assertions:
79
+ - type: llm_judge
80
+ criteria: "All 5 errors are correctly diagnosed — trigger scope for Error 1, fork PR permissions for Error 2, version tag format for Error 3, cache key using wrong file for Error 4, and missing job-level outputs declaration for Error 5"
81
+ weight: 0.35
82
+ description: "Correct error diagnoses"
83
+ - type: llm_judge
84
+ criteria: "Fixes are specific and correct — each fix shows the corrected YAML snippet, and the fixes address the root cause (not just the symptom). Error 2's fix addresses the fundamental fork permission model, not just a workaround"
85
+ weight: 0.35
86
+ description: "Specific correct fixes"
87
+ - type: llm_judge
88
+ criteria: "Debugging guide is practical — covers ACTIONS_RUNNER_DEBUG and ACTIONS_STEP_DEBUG secrets, how to navigate workflow run logs in the GitHub UI, the 'act' tool for local workflow testing, and at least 3 prevention strategies (linting, local testing, PR templates)"
89
+ weight: 0.30
90
+ description: "Practical debugging guide"
@@ -0,0 +1,59 @@
1
+ meta:
2
+ id: workflow-status-notifications
3
+ level: 1
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Configure workflow notifications — set up status badges, Slack alerts, and PR comments to communicate CI results effectively"
7
+ tags: [github, actions, notifications, badges, Slack, PR-comments, basics]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ Your team wants better visibility into CI status. Currently, the
13
+ only way to know if CI passed is to click into the Actions tab.
14
+ You need to set up 3 notification channels.
15
+
16
+ Channel 1 — README status badges:
17
+ - Add build status badge to README.md
18
+ - Show status for the main branch
19
+ - Include separate badges for: CI tests, deploy status, and
20
+ code coverage percentage
21
+
22
+ Channel 2 — Slack notifications:
23
+ - Send a message to #engineering-ci channel when:
24
+ * A deployment to production succeeds (green message)
25
+ * Any CI run on main fails (red message with link to logs)
26
+ - Do NOT notify on:
27
+ * Successful PR CI runs (too noisy)
28
+ * Cancelled workflows
29
+ - Include: commit message, author, branch, link to workflow run
30
+
31
+ Channel 3 — PR comments:
32
+ - Post a comment on the PR with:
33
+ * Test results summary (X passed, Y failed, Z skipped)
34
+ * Code coverage percentage (from coverage report)
35
+ * Build size comparison (current vs main)
36
+ * Link to full logs
37
+ - Update the existing comment instead of posting a new one each
38
+ time (avoid comment spam)
39
+
40
+ Task: Write the workflow additions for all 3 channels. Include: the
41
+ status badge markdown for the README, the Slack notification workflow
42
+ job (using a Slack webhook or action), the PR comment job (using
43
+ actions/github-script or similar), and the logic to update existing
44
+ comments instead of creating new ones. Explain the trade-offs of each
45
+ notification approach.
46
+
47
+ assertions:
48
+ - type: llm_judge
49
+ criteria: "Status badges are correct — uses the correct GitHub badge URL format (https://github.com/OWNER/REPO/actions/workflows/FILE/badge.svg?branch=main), includes multiple badges, and the markdown syntax is valid for README.md"
50
+ weight: 0.35
51
+ description: "Correct status badges"
52
+ - type: llm_judge
53
+ criteria: "Slack notification is properly conditional — only sends on main branch failures and production deploy successes, uses correct if: conditions to filter events, and the message includes all required context (commit, author, link)"
54
+ weight: 0.35
55
+ description: "Properly conditional Slack notification"
56
+ - type: llm_judge
57
+ criteria: "PR comment uses find-and-update pattern — searches for existing bot comment (by marker text or comment body pattern), updates if found or creates if not, includes test results and coverage, and the implementation uses GitHub API correctly"
58
+ weight: 0.30
59
+ description: "Smart PR comment updates"
@@ -0,0 +1,56 @@
1
+ meta:
2
+ id: workflow-triggers
3
+ level: 1
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Configure workflow triggers — set up push, pull_request, schedule, workflow_dispatch, and release triggers with filters"
7
+ tags: [github, actions, triggers, events, schedule, workflow-dispatch, basics]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're configuring triggers for an e-commerce application's CI/CD
13
+ pipeline. The team needs 5 different workflow files, each with a
14
+ specific trigger configuration.
15
+
16
+ Workflow 1 — CI Tests (ci.yml):
17
+ - Run on every push to any branch
18
+ - Run on every pull request to the main branch
19
+ - Only run when source code changes (src/** or package.json), NOT
20
+ when only documentation (docs/**) or README changes
21
+
22
+ Workflow 2 — Nightly Cleanup (nightly.yml):
23
+ - Run every day at 2:00 AM UTC
24
+ - Also allow manual triggering for on-demand cleanup
25
+
26
+ Workflow 3 — Production Deploy (deploy.yml):
27
+ - Manual trigger only (workflow_dispatch)
28
+ - Accept an input parameter "environment" with options: staging, production
29
+ - Accept an input parameter "version" (required, string)
30
+
31
+ Workflow 4 — Release (release.yml):
32
+ - Trigger when a GitHub Release is published
33
+ - Should NOT trigger on draft releases or pre-releases
34
+
35
+ Workflow 5 — Dependency Update (deps.yml):
36
+ - Run every Monday at 9:00 AM UTC
37
+ - Also trigger when package-lock.json changes on push to main
38
+
39
+ Task: Write the complete 'on:' section for each workflow file. For
40
+ each, explain: when it will trigger, when it will NOT trigger, and
41
+ one common pitfall to avoid. Also explain the difference between
42
+ 'paths' and 'paths-ignore' filters, and when to use each.
43
+
44
+ assertions:
45
+ - type: llm_judge
46
+ criteria: "All 5 trigger configurations are syntactically correct — push with branch and path filters, schedule with valid cron expressions (0 2 * * * for daily 2AM, 0 9 * * 1 for Monday 9AM), workflow_dispatch with typed inputs, release with types: [published]"
47
+ weight: 0.35
48
+ description: "Syntactically correct triggers"
49
+ - type: llm_judge
50
+ criteria: "Trigger behavior is accurately explained — each workflow's trigger and non-trigger conditions are correct, the paths/paths-ignore distinction is clear, and pitfalls are practical (e.g., schedule cron runs on default branch only, workflow_dispatch only works on default branch)"
51
+ weight: 0.35
52
+ description: "Accurate trigger behavior explanation"
53
+ - type: llm_judge
54
+ criteria: "Pitfalls and edge cases are noted — mentions that paths filters don't work with schedule triggers, that release published excludes drafts, that cron schedules can be delayed by GitHub load, and that workflow_dispatch inputs have no runtime validation by default"
55
+ weight: 0.30
56
+ description: "Practical pitfalls and edge cases"
@@ -0,0 +1,58 @@
1
+ meta:
2
+ id: concurrency-control
3
+ level: 2
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Manage workflow concurrency — prevent duplicate runs, configure merge queues, and handle parallel deployments safely"
7
+ tags: [github, actions, concurrency, merge-queue, parallel, intermediate]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ Your team's CI/CD has several concurrency problems causing wasted
13
+ resources and deployment conflicts:
14
+
15
+ Problem 1 — Duplicate CI runs:
16
+ A developer pushes 3 commits in quick succession. Each push triggers
17
+ a separate CI run. The first 2 runs are wasted because only the
18
+ latest commit matters. This wastes 24 minutes of runner time per
19
+ occurrence, happening ~20 times per day.
20
+
21
+ Problem 2 — Deployment conflicts:
22
+ Two PRs merge to main within seconds of each other. Both trigger
23
+ deployment workflows. The deployments race — sometimes deployment B
24
+ starts before deployment A finishes, causing a partially deployed
25
+ state. Last week this caused a 30-minute outage.
26
+
27
+ Problem 3 — PR merge bottleneck:
28
+ With "require branch up to date with main" enabled, only one PR can
29
+ merge at a time. Each PR merge triggers CI again. With 15 PRs per
30
+ day, this creates a 2-hour queue. The team is considering GitHub's
31
+ merge queue feature.
32
+
33
+ Problem 4 — Resource contention:
34
+ Self-hosted runners (4 total) are overwhelmed during peak hours
35
+ (10AM-2PM). 12 workflows queue up for runners, and some time out
36
+ after 30 minutes waiting.
37
+
38
+ Task: Solve all 4 problems. For each, write: the root cause analysis,
39
+ the solution using GitHub Actions concurrency features (concurrency
40
+ groups, cancel-in-progress, merge queue), the workflow YAML changes,
41
+ and the trade-offs of each solution. Include: the concurrency group
42
+ naming strategy (how to scope groups by PR, branch, or workflow),
43
+ the merge queue configuration, and the runner capacity planning
44
+ recommendations.
45
+
46
+ assertions:
47
+ - type: llm_judge
48
+ criteria: "Concurrency groups are correctly configured — uses concurrency with group names scoped appropriately (e.g., ci-${{ github.ref }} for CI, deploy-production for deployments), cancel-in-progress: true for CI but false for deployments, and the naming strategy prevents accidental conflicts"
49
+ weight: 0.35
50
+ description: "Correct concurrency configuration"
51
+ - type: llm_judge
52
+ criteria: "All 4 problems are solved — duplicate runs cancelled with concurrency groups, deployments serialized with concurrency (no cancel), merge queue configured to batch PRs, and runner capacity recommendations address peak load (scaling, priority queues)"
53
+ weight: 0.35
54
+ description: "All problems solved"
55
+ - type: llm_judge
56
+ criteria: "Trade-offs are explained — notes that cancel-in-progress means intermediate results are lost, serialized deployments slow down when many PRs merge, merge queue adds complexity, and runner scaling has cost implications"
57
+ weight: 0.30
58
+ description: "Trade-offs explained"
@@ -0,0 +1,60 @@
1
+ meta:
2
+ id: conditional-execution
3
+ level: 2
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Master conditional execution — use if expressions, status functions, and context variables to control when jobs and steps run"
7
+ tags: [github, actions, conditional, if-expressions, contexts, intermediate]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're building a sophisticated deployment workflow that must behave
13
+ differently based on various conditions. The workflow needs to handle
14
+ multiple deployment targets, branch-specific logic, and failure
15
+ recovery.
16
+
17
+ Scenarios to implement:
18
+
19
+ Scenario 1 — Branch-based deployment:
20
+ - Push to main → deploy to staging
21
+ - Push with tag v*.*.* → deploy to production
22
+ - Push to feature/* → deploy to preview environment
23
+ - Pull request → run tests only (no deployment)
24
+
25
+ Scenario 2 — Conditional step execution:
26
+ - Run database migrations only if migration files changed
27
+ - Send Slack notification only on failure
28
+ - Skip expensive E2E tests if the PR is labeled "skip-e2e"
29
+ - Run security scan only on PRs touching src/auth/** files
30
+
31
+ Scenario 3 — Context-based decisions:
32
+ - Use different AWS accounts based on environment (staging/production)
33
+ - Set different resource limits based on runner type
34
+ - Include debug logging only when triggered manually with debug=true
35
+
36
+ Scenario 4 — Error recovery:
37
+ - If deployment fails, automatically run rollback
38
+ - If rollback also fails, page the on-call engineer
39
+ - Always run cleanup steps regardless of failure
40
+ - Produce a deployment report with pass/fail status for each step
41
+
42
+ Task: Write the workflow YAML covering all 4 scenarios. For each
43
+ condition, explain: the expression syntax, the available context
44
+ variables (github.event_name, github.ref, contains(), startsWith()),
45
+ and the evaluation rules (when does a condition short-circuit). Include
46
+ a cheat sheet of the most useful conditional expressions.
47
+
48
+ assertions:
49
+ - type: llm_judge
50
+ criteria: "Conditional expressions are syntactically correct — uses github.ref, github.event_name, contains(), startsWith(), success(), failure(), always(), and the expressions handle all 4 scenarios correctly including tag matching for semver"
51
+ weight: 0.35
52
+ description: "Correct conditional expressions"
53
+ - type: llm_judge
54
+ criteria: "Error recovery pattern is sound — deployment failure triggers rollback step (if: failure()), rollback failure triggers paging, cleanup runs with if: always(), and the deployment report captures status from all steps using step outcomes"
55
+ weight: 0.35
56
+ description: "Sound error recovery pattern"
57
+ - type: llm_judge
58
+ criteria: "Cheat sheet is comprehensive and practical — covers the most common 10+ conditional patterns, explains boolean logic in expressions, notes that secrets context is not available in if: conditions, and clarifies the difference between job-level and step-level if:"
59
+ weight: 0.30
60
+ description: "Comprehensive conditional cheat sheet"
@@ -0,0 +1,55 @@
1
+ meta:
2
+ id: custom-actions-development
3
+ level: 2
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Develop custom GitHub Actions — build JavaScript, Docker, and composite actions for team-specific automation needs"
7
+ tags: [github, actions, custom-actions, JavaScript, Docker, composite, intermediate]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ Your team has 3 automation needs that aren't covered by existing
13
+ marketplace actions. You need to build custom actions.
14
+
15
+ Action 1 — "deployment-notifier" (Composite action):
16
+ Purpose: Post a formatted deployment summary to Slack and update
17
+ a GitHub deployment status. Used in 8 repos.
18
+ Inputs: environment, version, status (success/failure), slack-webhook
19
+ Behavior: Posts Slack message with deployment details, creates GitHub
20
+ deployment status, and writes a summary to $GITHUB_STEP_SUMMARY
21
+
22
+ Action 2 — "pr-size-labeler" (JavaScript action):
23
+ Purpose: Automatically label PRs by size (XS, S, M, L, XL) based
24
+ on lines changed. Also warn if the PR exceeds 500 lines.
25
+ Inputs: github-token, size-thresholds (JSON: {XS: 10, S: 50, ...})
26
+ Behavior: Reads PR diff stats, applies label, posts warning comment
27
+ if over threshold
28
+
29
+ Action 3 — "security-context-check" (Docker action):
30
+ Purpose: Scan environment for leaked secrets, check that no
31
+ hardcoded credentials exist in the code, and verify .env files
32
+ aren't committed. Runs in an isolated Docker container for security.
33
+ Inputs: scan-paths, exclude-patterns, severity-threshold
34
+ Outputs: findings-count, report-path
35
+
36
+ Task: Build all 3 actions. For each, write: the action.yml metadata
37
+ file, the implementation (shell script for composite, index.js for
38
+ JavaScript, Dockerfile + entrypoint for Docker), the test strategy
39
+ (how to test custom actions), and the publishing approach (how to
40
+ version and release). Compare the 3 action types: when to use each,
41
+ performance differences, and maintenance considerations.
42
+
43
+ assertions:
44
+ - type: llm_judge
45
+ criteria: "action.yml files are correctly structured — each has proper name, description, inputs with types/defaults/required, outputs where applicable, runs section matching the action type (composite/node20/docker), and branding metadata"
46
+ weight: 0.35
47
+ description: "Correct action.yml structure"
48
+ - type: llm_judge
49
+ criteria: "Implementations are functional — composite action uses correct shell syntax with ${{ inputs.* }}, JavaScript action uses @actions/core and @actions/github packages correctly, Docker action has proper Dockerfile and entrypoint script receiving inputs as env vars"
50
+ weight: 0.35
51
+ description: "Functional implementations"
52
+ - type: llm_judge
53
+ criteria: "Comparison helps decision-making — explains when to choose composite (simple, no build step), JavaScript (rich API access, fast startup), or Docker (isolation, any language), and covers testing strategies, versioning with tags, and the marketplace publishing process"
54
+ weight: 0.30
55
+ description: "Decision-helping comparison"