code-foundry 0.21.2 → 0.22.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.
@@ -13,6 +13,7 @@ Options:
13
13
  --languages LIST auto or comma-separated: typescript,rust,python,solidity
14
14
  --features LIST all or comma-separated standard features
15
15
  --package-manager NAME auto, bun, pnpm, yarn, or npm
16
+ --config PATH Use a .github/code-foundry.yml configuration file
16
17
  --runtime-repository OWNER/REPO Reusable workflow runtime repository
17
18
  --runtime-ref REF Reusable workflow runtime tag or branch
18
19
  --license NAME preserve, agpl-3.0-or-later, mit, or none
@@ -27,11 +28,13 @@ EOF
27
28
  source_ref="main"
28
29
  mode="check"
29
30
  source=""
31
+ config_file="${REPO_FOUNDRY_CONFIG:-}"
30
32
  temp_dir=""
31
33
  profile="${REPO_FOUNDRY_PROFILE:-auto}"
32
34
  languages="${REPO_FOUNDRY_LANGUAGES:-auto}"
33
35
  features="${REPO_FOUNDRY_FEATURES:-all}"
34
36
  prune=false
37
+ prune_set=false
35
38
  force=false
36
39
  languages_set=false
37
40
  profile_set=false
@@ -51,14 +54,30 @@ runtime_ref_set=false
51
54
  template_ref=""
52
55
  release_type="${REPO_FOUNDRY_RELEASE_TYPE:-auto}"
53
56
  npm_publish="${REPO_FOUNDRY_NPM_PUBLISH:-false}"
57
+ prune_standard="${REPO_FOUNDRY_PRUNE_STANDARD:-false}"
58
+ runner="${REPO_FOUNDRY_RUNNER:-}"
59
+ unit_runner="${REPO_FOUNDRY_UNIT_RUNNER:-}"
60
+ ci_runner="${REPO_FOUNDRY_CI_RUNNER:-}"
61
+ test_runner="${REPO_FOUNDRY_TEST_RUNNER:-}"
62
+ security_runner="${REPO_FOUNDRY_SECURITY_RUNNER:-}"
63
+ codeql_runner="${REPO_FOUNDRY_CODEQL_RUNNER:-}"
64
+ pr_runner="${REPO_FOUNDRY_PR_RUNNER:-}"
65
+ release_runner="${REPO_FOUNDRY_RELEASE_RUNNER:-}"
66
+ cache_packages="${REPO_FOUNDRY_CACHE_PACKAGES:-}"
67
+ cache_build="${REPO_FOUNDRY_CACHE_BUILD:-}"
68
+ coverage_minimum="${REPO_FOUNDRY_COVERAGE_MINIMUM:-}"
69
+ turbo_remote="${REPO_FOUNDRY_TURBO_REMOTE:-}"
54
70
  license="${REPO_FOUNDRY_LICENSE:-preserve}"
55
71
  license_file="${REPO_FOUNDRY_LICENSE_FILE:-}"
56
72
  release_type_set=false
57
73
  npm_publish_set=false
58
74
  license_set=false
75
+ license_file_set=false
59
76
  [ -n "${REPO_FOUNDRY_RELEASE_TYPE:-}" ] && release_type_set=true
60
77
  [ -n "${REPO_FOUNDRY_NPM_PUBLISH:-}" ] && npm_publish_set=true
78
+ [ -n "${REPO_FOUNDRY_PRUNE_STANDARD:-}" ] && prune_set=true
61
79
  [ -n "${REPO_FOUNDRY_LICENSE:-}" ] && license_set=true
80
+ [ -n "${REPO_FOUNDRY_LICENSE_FILE:-}" ] && license_file_set=true
62
81
  node_version="24.18.0"
63
82
  bun_version="1.3.14"
64
83
  python_version="3.13"
@@ -108,6 +127,7 @@ while [ "$#" -gt 0 ]; do
108
127
  case "$1" in
109
128
  --source) source="${2:?missing source path or URL}"; shift 2 ;;
110
129
  --ref) source_ref="${2:?missing ref}"; shift 2 ;;
130
+ --config) config_file="${2:?missing config path}"; shift 2 ;;
111
131
  --profile) profile="${2:?missing profile}"; profile_set=true; shift 2 ;;
112
132
  --languages) languages="${2:?missing language list}"; languages_set=true; shift 2 ;;
113
133
  --features) features="${2:?missing feature list}"; features_set=true; shift 2 ;;
@@ -115,10 +135,10 @@ while [ "$#" -gt 0 ]; do
115
135
  --runtime-repository) runtime_repository="${2:?missing runtime repository}"; runtime_repository_set=true; shift 2 ;;
116
136
  --runtime-ref) runtime_ref="${2:?missing runtime ref}"; runtime_ref_set=true; shift 2 ;;
117
137
  --license) license="${2:?missing license}"; license_set=true; shift 2 ;;
118
- --license-file) license_file="${2:?missing license file}"; shift 2 ;;
138
+ --license-file) license_file="${2:?missing license file}"; license_file_set=true; shift 2 ;;
119
139
  --check) mode="check"; shift ;;
120
140
  --apply) mode="apply"; shift ;;
121
- --prune) prune=true; shift ;;
141
+ --prune) prune=true; prune_set=true; shift ;;
122
142
  --force) force=true; shift ;;
123
143
  -h|--help) usage; exit 0 ;;
124
144
  *) usage >&2; exit 2 ;;
@@ -126,43 +146,91 @@ while [ "$#" -gt 0 ]; do
126
146
  done
127
147
 
128
148
  [ -n "$source" ] || { usage >&2; exit 2; }
129
- if [ -f .github/template.yml ]; then
149
+ if [ -n "$config_file" ]; then
150
+ [ -f "$config_file" ] || { printf 'Configuration file not found: %s\n' "$config_file" >&2; exit 1; }
151
+ mkdir -p .github
152
+ if [ "$(cd -- "$(dirname -- "$config_file")" && pwd)/$(basename -- "$config_file")" != "$(pwd)/.github/code-foundry.yml" ]; then
153
+ cp "$config_file" .github/code-foundry.yml
154
+ fi
155
+ fi
156
+ config_path=.github/code-foundry.yml
157
+ [ -f "$config_path" ] || config_path=.github/template.yml
158
+ if [ -f "$config_path" ]; then
159
+ config_value() {
160
+ awk -F': ' -v key="$1" '$1 == key { value=$2; sub(/[[:space:]]+#.*/, "", value); gsub(/^[[:space:]]+|[[:space:]]+$/, "", value); print value; exit }' "$config_path"
161
+ }
130
162
  if [ "$profile_set" = false ]; then
131
- configured_profile="$(awk -F': ' '/^profile:/ {print $2; exit}' .github/template.yml)"
163
+ configured_profile="$(config_value profile)"
132
164
  [ -n "$configured_profile" ] && profile="$configured_profile"
133
165
  fi
134
166
  if [ "$languages_set" = false ]; then
135
- configured_languages="$(awk -F': ' '/^languages:/ {print $2; exit}' .github/template.yml)"
167
+ configured_languages="$(config_value languages)"
136
168
  [ -n "$configured_languages" ] && languages="$configured_languages"
137
169
  fi
138
170
  if [ "$features_set" = false ]; then
139
- configured_features="$(awk -F': ' '/^features:/ {print $2; exit}' .github/template.yml)"
171
+ configured_features="$(config_value features)"
140
172
  [ -n "$configured_features" ] && features="$configured_features"
141
173
  fi
142
174
  if [ "$package_manager_set" = false ]; then
143
- package_manager="$(awk -F': ' '/^package_manager:/ {print $2; exit}' .github/template.yml)"
175
+ package_manager="$(config_value package_manager)"
144
176
  fi
145
177
  if [ "$runtime_repository_set" = false ]; then
146
- runtime_repository="$(awk -F': ' '/^runtime_repository:/ {print $2; exit}' .github/template.yml)"
178
+ runtime_repository="$(config_value runtime_repository)"
147
179
  fi
148
180
  if [ "$runtime_ref_set" = false ]; then
149
- runtime_ref="$(awk -F': ' '/^runtime_ref:/ {print $2; exit}' .github/template.yml)"
181
+ runtime_ref="$(config_value runtime_ref)"
150
182
  fi
151
- template_ref="$(awk -F': ' '/^template:/ {print $2; exit}' .github/template.yml)"
183
+ template_ref="$(config_value template)"
152
184
  if [ "$release_type_set" != true ]; then
153
- configured_release_type="$(awk -F': ' '/^release_type:/ {print $2; exit}' .github/template.yml)"
185
+ configured_release_type="$(config_value release_type)"
154
186
  [ -n "$configured_release_type" ] && release_type="$configured_release_type"
155
187
  fi
156
188
  if [ "$npm_publish_set" != true ]; then
157
- configured_npm_publish="$(awk -F': ' '/^npm_publish:/ {print $2; exit}' .github/template.yml)"
189
+ configured_npm_publish="$(config_value npm_publish)"
158
190
  [ -n "$configured_npm_publish" ] && npm_publish="$configured_npm_publish"
159
191
  fi
160
192
  if [ "$license_set" != true ]; then
161
- configured_license="$(awk -F': ' '/^license:/ {print $2; exit}' .github/template.yml)"
193
+ configured_license="$(config_value license)"
162
194
  [ -n "$configured_license" ] && license="$configured_license"
163
195
  fi
196
+ if [ "$license_file_set" = false ]; then
197
+ license_file="$(config_value license_file)"
198
+ fi
199
+ if [ "$prune_set" = false ]; then
200
+ configured_prune="$(config_value prune_standard)"
201
+ [ -n "$configured_prune" ] && prune_standard="$configured_prune"
202
+ fi
203
+ [ -n "$runner" ] || runner="$(config_value runner)"
204
+ [ -n "$unit_runner" ] || unit_runner="$(config_value unit_runner)"
205
+ [ -n "$ci_runner" ] || ci_runner="$(config_value ci_runner)"
206
+ [ -n "$test_runner" ] || test_runner="$(config_value test_runner)"
207
+ [ -n "$security_runner" ] || security_runner="$(config_value security_runner)"
208
+ [ -n "$codeql_runner" ] || codeql_runner="$(config_value codeql_runner)"
209
+ [ -n "$pr_runner" ] || pr_runner="$(config_value pr_runner)"
210
+ [ -n "$release_runner" ] || release_runner="$(config_value release_runner)"
211
+ [ -n "$cache_packages" ] || cache_packages="$(config_value cache_packages)"
212
+ [ -n "$cache_build" ] || cache_build="$(config_value cache_build)"
213
+ [ -n "$coverage_minimum" ] || coverage_minimum="$(config_value coverage_minimum)"
214
+ [ -n "$turbo_remote" ] || turbo_remote="$(config_value turbo_remote)"
164
215
  fi
165
216
  [ -n "$package_manager" ] || package_manager=auto
217
+ [ -n "$runner" ] || runner=ubuntu-latest
218
+ [ -n "$unit_runner" ] || unit_runner=ubuntu-slim
219
+ [ -n "$ci_runner" ] || ci_runner="$runner"
220
+ [ -n "$test_runner" ] || test_runner="$runner"
221
+ [ -n "$security_runner" ] || security_runner=ubuntu-slim
222
+ [ -n "$codeql_runner" ] || codeql_runner="$runner"
223
+ [ -n "$pr_runner" ] || pr_runner=ubuntu-slim
224
+ [ -n "$release_runner" ] || release_runner=ubuntu-slim
225
+ [ -n "$cache_packages" ] || cache_packages=auto
226
+ [ -n "$cache_build" ] || cache_build=auto
227
+ [ -n "$coverage_minimum" ] || coverage_minimum=80
228
+ [ -n "$turbo_remote" ] || turbo_remote=auto
229
+ [ "$prune_standard" = true ] || [ "$prune_standard" = false ] || {
230
+ printf 'prune_standard must be true or false: %s\n' "$prune_standard" >&2
231
+ exit 2
232
+ }
233
+ [ "$prune_standard" = true ] && prune=true
166
234
  if [ -z "$runtime_repository" ]; then
167
235
  source_repository="$source"
168
236
  if [ -d "$source" ]; then
@@ -194,6 +262,11 @@ case "$license" in
194
262
  *) printf 'Unsupported license: %s\n' "$license" >&2; exit 2 ;;
195
263
  esac
196
264
  [ -z "$license_file" ] || license=custom
265
+ for configured_runner in "$runner" "$unit_runner" "$ci_runner" "$test_runner" "$security_runner" "$codeql_runner" "$pr_runner" "$release_runner"; do
266
+ case "$configured_runner" in
267
+ ''|*[!A-Za-z0-9._/-]*) printf 'Runner contains unsupported characters: %s\n' "$configured_runner" >&2; exit 2 ;;
268
+ esac
269
+ done
197
270
 
198
271
  if [ -d "$source" ] && [ -f "$source/.github/scripts/sync-template.sh" ]; then
199
272
  template_root="$source"
@@ -206,8 +279,10 @@ fi
206
279
 
207
280
  # Prefer an explicit CLI/environment value, then the target's saved contract,
208
281
  # then the source template's contract, and finally the stable public runtime.
209
- if [ -z "$runtime_ref" ] && [ -f "$template_root/.github/template.yml" ]; then
210
- runtime_ref="$(awk -F': ' '/^runtime_ref:/ {print $2; exit}' "$template_root/.github/template.yml")"
282
+ source_config="$template_root/.github/code-foundry.yml"
283
+ [ -f "$source_config" ] || source_config="$template_root/.github/template.yml"
284
+ if [ -z "$runtime_ref" ] && [ -f "$source_config" ]; then
285
+ runtime_ref="$(awk -F': ' '/^runtime_ref:/ {print $2; exit}' "$source_config")"
211
286
  fi
212
287
  [ -n "$runtime_ref" ] || runtime_ref="v0.20.2"
213
288
  case "$runtime_ref" in
@@ -253,7 +328,7 @@ files=(
253
328
  ruff.toml
254
329
  .prettierrc
255
330
  .github/CODEOWNERS
256
- .github/template.yml.example
331
+ .github/code-foundry.yml.example
257
332
  .github/CODE_OF_CONDUCT.md
258
333
  .github/CONTRIBUTING.md
259
334
  .github/PULL_REQUEST_TEMPLATE.md
@@ -264,6 +339,8 @@ files=(
264
339
  .github/ISSUE_TEMPLATE/feature_request.yml
265
340
  .github/scripts/profile.sh
266
341
  .github/scripts/bootstrap.sh
342
+ # Keep the small local hook runner and its changed-file helper; the full
343
+ # CI/security implementations used by Actions are loaded from the runtime.
267
344
  .github/scripts/changed-files.sh
268
345
  .github/scripts/ci.sh
269
346
  .github/scripts/doctor.sh
@@ -394,9 +471,11 @@ done
394
471
  # the source's configured runtime first so forks remain self-contained.
395
472
  source_runtime_repository=""
396
473
  source_runtime_ref=""
397
- if [ -f "$template_root/.github/template.yml" ]; then
398
- source_runtime_repository="$(awk -F': ' '/^runtime_repository:/ {print $2; exit}' "$template_root/.github/template.yml")"
399
- source_runtime_ref="$(awk -F': ' '/^runtime_ref:/ {print $2; exit}' "$template_root/.github/template.yml")"
474
+ source_config="$template_root/.github/code-foundry.yml"
475
+ [ -f "$source_config" ] || source_config="$template_root/.github/template.yml"
476
+ if [ -f "$source_config" ]; then
477
+ source_runtime_repository="$(awk -F': ' '/^runtime_repository:/ {print $2; exit}' "$source_config")"
478
+ source_runtime_ref="$(awk -F': ' '/^runtime_ref:/ {print $2; exit}' "$source_config")"
400
479
  fi
401
480
  [ -n "$source_runtime_repository" ] || source_runtime_repository="0xPlayerOne/code-foundry"
402
481
  [ -n "$source_runtime_ref" ] || source_runtime_ref="$runtime_ref"
@@ -407,10 +486,21 @@ for file in .github/workflows/ci.yml .github/workflows/test.yml .github/workflow
407
486
  if [ "$mode" = "check" ]; then
408
487
  printf 'Would render runtime repository in %s\n' "$file"
409
488
  else
489
+ runner_value="$runner"
490
+ case "$file" in
491
+ .github/workflows/ci.yml) runner_value="$ci_runner" ;;
492
+ .github/workflows/test.yml) runner_value="$test_runner" ;;
493
+ .github/workflows/security.yml) runner_value="$security_runner" ;;
494
+ .github/workflows/codeql.yml) runner_value="$codeql_runner" ;;
495
+ .github/workflows/draft-pr.yml|.github/workflows/release-pr.yml) runner_value="$pr_runner" ;;
496
+ .github/workflows/release.yml) runner_value="$release_runner" ;;
497
+ esac
410
498
  rendered_workflow="$(mktemp)"
411
499
  sed -E \
412
500
  -e "s#${source_runtime_repository}@[^[:space:]]+#${runtime_repository}@${runtime_ref}#g" \
413
501
  -e "s#runtime-ref: [^[:space:]]+#runtime-ref: ${runtime_ref}#g" \
502
+ -e "s#^ runner: [^[:space:]]+# runner: ${runner_value}#" \
503
+ -e "s#^ unit-runner: [^[:space:]]+# unit-runner: ${unit_runner}#" \
414
504
  "$file" > "$rendered_workflow"
415
505
  mv "$rendered_workflow" "$file"
416
506
  printf 'Rendered runtime repository in %s\n' "$file"
@@ -592,10 +682,26 @@ if [ "$mode" = "apply" ]; then
592
682
  fi
593
683
  printf 'runtime_repository: %s\n' "$runtime_repository"
594
684
  printf 'runtime_ref: %s\n' "$runtime_ref"
685
+ printf 'runner: %s\n' "$runner"
686
+ printf 'unit_runner: %s\n' "$unit_runner"
687
+ printf 'ci_runner: %s\n' "$ci_runner"
688
+ printf 'test_runner: %s\n' "$test_runner"
689
+ printf 'security_runner: %s\n' "$security_runner"
690
+ printf 'codeql_runner: %s\n' "$codeql_runner"
691
+ printf 'pr_runner: %s\n' "$pr_runner"
692
+ printf 'release_runner: %s\n' "$release_runner"
693
+ printf 'prune_standard: %s\n' "$prune_standard"
694
+ printf 'cache_packages: %s\n' "$cache_packages"
695
+ printf 'cache_build: %s\n' "$cache_build"
696
+ printf 'coverage_minimum: %s\n' "$coverage_minimum"
697
+ printf 'turbo_remote: %s\n' "$turbo_remote"
595
698
  printf 'release_type: %s\n' "$release_type"
596
699
  printf 'npm_publish: %s\n' "$npm_publish"
597
700
  printf 'license: %s\n' "$license"
598
- } > .github/template.yml
701
+ if [ -n "$license_file" ]; then
702
+ printf 'license_file: %s\n' "$license_file"
703
+ fi
704
+ } > .github/code-foundry.yml
599
705
  fi
600
706
 
601
707
  if [ "$prune" = true ]; then
@@ -611,6 +717,15 @@ if [ "$prune" = true ]; then
611
717
  fi
612
718
  fi
613
719
  done
720
+ if [ -f .github/dependabot.yml ] && ! workflow_enabled dependabot; then
721
+ changed=$((changed + 1))
722
+ if [ "$mode" = "check" ]; then
723
+ printf 'Would remove disabled standard configuration .github/dependabot.yml\n'
724
+ else
725
+ rm .github/dependabot.yml
726
+ printf '%s\n' 'Removed disabled standard configuration .github/dependabot.yml'
727
+ fi
728
+ fi
614
729
  fi
615
730
 
616
731
  printf '%s\n' "$changed baseline file(s) differ."
@@ -1,17 +1,4 @@
1
- version: 1
2
- template: code-foundry@latest
3
- profile: auto
4
- languages: typescript
5
- features: all
1
+ # Temporary compatibility shim for reusable workflow runtime v0.20.2.
2
+ # Removed after the runtime tag that understands .github/code-foundry.yml is published.
6
3
  package_manager: bun
7
- runtime_repository: 0xPlayerOne/code-foundry
8
- runtime_ref: v0.20.2
9
- release_type: node
10
- npm_publish: true
11
- license: agpl-3.0-or-later
12
- runner: ubuntu-latest
13
- unit_runner: ubuntu-slim
14
- cache_packages: auto
15
- cache_build: auto
16
- coverage_minimum: 80
17
- turbo_remote: auto
4
+ languages: typescript
@@ -12,7 +12,12 @@ on:
12
12
  description: Code Foundry runtime tag or ref.
13
13
  required: false
14
14
  type: string
15
- default: v0.20.0
15
+ default: v0.20.2
16
+ runner:
17
+ description: Runner used by CI jobs.
18
+ required: false
19
+ type: string
20
+ default: ubuntu-latest
16
21
 
17
22
  permissions:
18
23
  contents: read
@@ -36,7 +41,7 @@ concurrency:
36
41
  jobs:
37
42
  format:
38
43
  name: Format
39
- runs-on: ubuntu-latest
44
+ runs-on: ${{ inputs.runner }}
40
45
  steps:
41
46
  - name: Checkout
42
47
  uses: actions/checkout@v7
@@ -78,7 +83,7 @@ jobs:
78
83
 
79
84
  lint:
80
85
  name: Lint
81
- runs-on: ubuntu-latest
86
+ runs-on: ${{ inputs.runner }}
82
87
  steps:
83
88
  - name: Checkout
84
89
  uses: actions/checkout@v7
@@ -112,7 +117,7 @@ jobs:
112
117
 
113
118
  type-check:
114
119
  name: Type-Check
115
- runs-on: ubuntu-latest
120
+ runs-on: ${{ inputs.runner }}
116
121
  steps:
117
122
  - name: Checkout
118
123
  uses: actions/checkout@v7
@@ -146,7 +151,7 @@ jobs:
146
151
 
147
152
  build:
148
153
  name: Build
149
- runs-on: ubuntu-latest
154
+ runs-on: ${{ inputs.runner }}
150
155
  steps:
151
156
  - name: Checkout
152
157
  uses: actions/checkout@v7
@@ -12,7 +12,12 @@ on:
12
12
  description: Code Foundry runtime tag or ref.
13
13
  required: false
14
14
  type: string
15
- default: v0.20.0
15
+ default: v0.20.2
16
+ runner:
17
+ description: Runner used by CodeQL jobs.
18
+ required: false
19
+ type: string
20
+ default: ubuntu-latest
16
21
 
17
22
  permissions:
18
23
  actions: read
@@ -32,7 +37,7 @@ concurrency:
32
37
  jobs:
33
38
  detect:
34
39
  name: Detect
35
- runs-on: ubuntu-slim
40
+ runs-on: ${{ inputs.runner }}
36
41
  timeout-minutes: 10
37
42
  outputs:
38
43
  languages: ${{ steps.languages.outputs.languages }}
@@ -115,7 +120,7 @@ jobs:
115
120
  ( !github.event.repository.private || needs.detect.outputs.code_security == 'enabled' ) &&
116
121
  needs.detect.outputs.actions_available == 'true' &&
117
122
  needs.detect.outputs.actions_changed == 'true'
118
- runs-on: ubuntu-latest
123
+ runs-on: ${{ inputs.runner }}
119
124
  timeout-minutes: 30
120
125
  steps:
121
126
  - name: Checkout
@@ -148,7 +153,7 @@ jobs:
148
153
  ( !github.event.repository.private || needs.detect.outputs.code_security == 'enabled' ) &&
149
154
  needs.detect.outputs.javascript_available == 'true' &&
150
155
  needs.detect.outputs.javascript_changed == 'true'
151
- runs-on: ubuntu-latest
156
+ runs-on: ${{ inputs.runner }}
152
157
  timeout-minutes: 30
153
158
  steps:
154
159
  - name: Checkout
@@ -181,7 +186,7 @@ jobs:
181
186
  ( !github.event.repository.private || needs.detect.outputs.code_security == 'enabled' ) &&
182
187
  needs.detect.outputs.python_available == 'true' &&
183
188
  needs.detect.outputs.python_changed == 'true'
184
- runs-on: ubuntu-latest
189
+ runs-on: ${{ inputs.runner }}
185
190
  timeout-minutes: 30
186
191
  steps:
187
192
  - name: Checkout
@@ -214,7 +219,7 @@ jobs:
214
219
  ( !github.event.repository.private || needs.detect.outputs.code_security == 'enabled' ) &&
215
220
  needs.detect.outputs.rust_available == 'true' &&
216
221
  needs.detect.outputs.rust_changed == 'true'
217
- runs-on: ubuntu-latest
222
+ runs-on: ${{ inputs.runner }}
218
223
  timeout-minutes: 30
219
224
  steps:
220
225
  - name: Checkout
@@ -2,6 +2,12 @@ name: Code Foundry Draft PR
2
2
 
3
3
  on:
4
4
  workflow_call:
5
+ inputs:
6
+ runner:
7
+ description: Runner used to create the draft PR.
8
+ required: false
9
+ type: string
10
+ default: ubuntu-slim
5
11
 
6
12
  permissions:
7
13
  contents: read
@@ -13,7 +19,7 @@ env:
13
19
  jobs:
14
20
  create-draft-pr:
15
21
  name: Create
16
- runs-on: ubuntu-slim
22
+ runs-on: ${{ inputs.runner }}
17
23
  timeout-minutes: 10
18
24
  concurrency:
19
25
  group: ${{ github.workflow }}-${{ github.ref }}
@@ -2,6 +2,12 @@ name: Code Foundry Release PR
2
2
 
3
3
  on:
4
4
  workflow_call:
5
+ inputs:
6
+ runner:
7
+ description: Runner used to create the release PR.
8
+ required: false
9
+ type: string
10
+ default: ubuntu-slim
5
11
 
6
12
  permissions:
7
13
  contents: read
@@ -13,7 +19,7 @@ env:
13
19
  jobs:
14
20
  create-release-pr:
15
21
  name: Create
16
- runs-on: ubuntu-slim
22
+ runs-on: ${{ inputs.runner }}
17
23
  timeout-minutes: 10
18
24
  concurrency:
19
25
  group: ${{ github.workflow }}-${{ github.ref }}
@@ -2,6 +2,12 @@ name: Code Foundry Release
2
2
 
3
3
  on:
4
4
  workflow_call:
5
+ inputs:
6
+ runner:
7
+ description: Runner used by release jobs.
8
+ required: false
9
+ type: string
10
+ default: ubuntu-slim
5
11
 
6
12
  permissions:
7
13
  contents: write
@@ -19,7 +25,7 @@ env:
19
25
  jobs:
20
26
  release:
21
27
  name: Release / Version
22
- runs-on: ubuntu-slim
28
+ runs-on: ${{ inputs.runner }}
23
29
  timeout-minutes: 20
24
30
  concurrency:
25
31
  group: ${{ github.workflow }}-${{ github.ref }}
@@ -41,8 +47,10 @@ jobs:
41
47
  release_type="$(bash .github/scripts/profile.sh get release_type)"
42
48
  npm_publish="$(bash .github/scripts/profile.sh get npm_publish)"
43
49
  else
44
- release_type="$(awk -F': ' '/^release_type:/ {print $2; exit}' .github/template.yml 2>/dev/null || true)"
45
- npm_publish="$(awk -F': ' '/^npm_publish:/ {print $2; exit}' .github/template.yml 2>/dev/null || true)"
50
+ config_file=.github/code-foundry.yml
51
+ [ -f "$config_file" ] || config_file=.github/template.yml
52
+ release_type="$(awk -F': ' '/^release_type:/ {print $2; exit}' "$config_file" 2>/dev/null || true)"
53
+ npm_publish="$(awk -F': ' '/^npm_publish:/ {print $2; exit}' "$config_file" 2>/dev/null || true)"
46
54
  fi
47
55
  [ -n "$release_type" ] || release_type=auto
48
56
  [ -n "$npm_publish" ] || npm_publish=false
@@ -77,7 +85,7 @@ jobs:
77
85
  name: Release / Publish npm
78
86
  needs: release
79
87
  if: needs.release.outputs.release_created == 'true' && needs.release.outputs.npm_publish == 'true'
80
- runs-on: ubuntu-slim
88
+ runs-on: ${{ inputs.runner }}
81
89
  timeout-minutes: 15
82
90
  permissions:
83
91
  contents: read
@@ -12,7 +12,12 @@ on:
12
12
  description: Code Foundry runtime tag or ref.
13
13
  required: false
14
14
  type: string
15
- default: v0.20.0
15
+ default: v0.20.2
16
+ runner:
17
+ description: Runner used by Security jobs.
18
+ required: false
19
+ type: string
20
+ default: ubuntu-slim
16
21
 
17
22
  permissions:
18
23
  contents: read
@@ -32,7 +37,7 @@ concurrency:
32
37
  jobs:
33
38
  profile:
34
39
  name: Profile
35
- runs-on: ubuntu-slim
40
+ runs-on: ${{ inputs.runner }}
36
41
  timeout-minutes: 10
37
42
  outputs:
38
43
  javascript: ${{ steps.profile.outputs.javascript }}
@@ -90,7 +95,7 @@ jobs:
90
95
 
91
96
  dependency-audit-javascript:
92
97
  name: Dependency Audit (JavaScript)
93
- runs-on: ubuntu-slim
98
+ runs-on: ${{ inputs.runner }}
94
99
  timeout-minutes: 20
95
100
  steps:
96
101
  - name: Checkout
@@ -140,7 +145,7 @@ jobs:
140
145
 
141
146
  dependency-audit-rust:
142
147
  name: Dependency Audit (Rust)
143
- runs-on: ${{ vars.REPO_FOUNDRY_RUST_AUDIT_RUNNER || 'ubuntu-latest' }}
148
+ runs-on: ${{ inputs.runner }}
144
149
  timeout-minutes: 20
145
150
  steps:
146
151
  - name: Checkout
@@ -213,7 +218,7 @@ jobs:
213
218
  max-parallel: 8
214
219
  matrix:
215
220
  requirement: ${{ fromJSON(needs.profile.outputs.python_requirements) }}
216
- runs-on: ubuntu-slim
221
+ runs-on: ${{ inputs.runner }}
217
222
  timeout-minutes: 20
218
223
  env:
219
224
  REPO_FOUNDRY_PYTHON_REQUIREMENT: ${{ matrix.requirement }}
@@ -261,7 +266,7 @@ jobs:
261
266
  name: Dependency Audit (Python)
262
267
  needs: [profile, dependency-audit-python]
263
268
  if: always()
264
- runs-on: ubuntu-slim
269
+ runs-on: ${{ inputs.runner }}
265
270
  timeout-minutes: 5
266
271
  steps:
267
272
  - name: Gate
@@ -281,7 +286,7 @@ jobs:
281
286
  dependency-review:
282
287
  name: Dependency Review
283
288
  if: ${{ github.event_name == 'pull_request' && !github.event.repository.private }}
284
- runs-on: ubuntu-slim
289
+ runs-on: ${{ inputs.runner }}
285
290
  timeout-minutes: 10
286
291
  steps:
287
292
  - name: Review
@@ -12,7 +12,17 @@ on:
12
12
  description: Code Foundry runtime tag or ref.
13
13
  required: false
14
14
  type: string
15
- default: v0.20.0
15
+ default: v0.20.2
16
+ runner:
17
+ description: Runner used by non-unit test jobs.
18
+ required: false
19
+ type: string
20
+ default: ubuntu-latest
21
+ unit-runner:
22
+ description: Runner used by unit tests.
23
+ required: false
24
+ type: string
25
+ default: ubuntu-slim
16
26
 
17
27
  permissions:
18
28
  contents: read
@@ -36,7 +46,7 @@ concurrency:
36
46
  jobs:
37
47
  unit:
38
48
  name: Unit
39
- runs-on: ${{ vars.REPO_FOUNDRY_UNIT_RUNNER || 'ubuntu-slim' }}
49
+ runs-on: ${{ inputs.unit-runner }}
40
50
  timeout-minutes: 30
41
51
  steps:
42
52
  - name: Checkout
@@ -97,7 +107,7 @@ jobs:
97
107
 
98
108
  integration:
99
109
  name: Integration
100
- runs-on: ubuntu-latest
110
+ runs-on: ${{ inputs.runner }}
101
111
  timeout-minutes: 30
102
112
  steps:
103
113
  - name: Checkout
@@ -142,7 +152,7 @@ jobs:
142
152
 
143
153
  e2e:
144
154
  name: E2E
145
- runs-on: ubuntu-latest
155
+ runs-on: ${{ inputs.runner }}
146
156
  timeout-minutes: 45
147
157
  steps:
148
158
  - name: Checkout
@@ -199,7 +209,7 @@ jobs:
199
209
 
200
210
  smoke:
201
211
  name: Smoke
202
- runs-on: ubuntu-latest
212
+ runs-on: ${{ inputs.runner }}
203
213
  timeout-minutes: 15
204
214
  steps:
205
215
  - name: Checkout
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.22.0](https://github.com/0xPlayerOne/code-foundry/compare/v0.21.2...v0.22.0) (2026-07-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * centralize repository configuration ([e1b4ef1](https://github.com/0xPlayerOne/code-foundry/commit/e1b4ef19ab1ecc899c06331cbfd3477062a73549))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * bridge legacy runtime configuration ([d906b0d](https://github.com/0xPlayerOne/code-foundry/commit/d906b0d8f0bc65d2697ababbd5ab658ca2193684))
14
+ * keep legacy runtime callers valid ([c23f9e2](https://github.com/0xPlayerOne/code-foundry/commit/c23f9e2980bfcb8a0b7c685f1a9ba6d26f215eba))
15
+
3
16
  ## [0.21.2](https://github.com/0xPlayerOne/code-foundry/compare/v0.21.1...v0.21.2) (2026-07-28)
4
17
 
5
18