Skip to content

Commit da58b38

Browse files
chore: allow GitHub Actions CI block to have env: too
1 parent 0da6188 commit da58b38

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: src/next/blocks/blockGitHubActionsCI.test.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,10 @@ describe("blockGitHubActionsCI", () => {
198198
name: "Validate",
199199
steps: [
200200
{
201+
env: { VAR_ENV: "true" },
201202
if: "always()",
202203
run: "pnpm validate",
203-
with: { ENV_VAR: "true" },
204+
with: { VAR_WITH: "true" },
204205
},
205206
],
206207
},
@@ -269,10 +270,12 @@ describe("blockGitHubActionsCI", () => {
269270
steps:
270271
- uses: actions/checkout@v4
271272
- uses: ./.github/actions/prepare
272-
- if: always()
273+
- env:
274+
VAR_ENV: "true"
275+
if: always()
273276
run: pnpm validate
274277
with:
275-
ENV_VAR: "true"
278+
VAR_WITH: "true"
276279
277280
name: CI
278281

Diff for: src/next/blocks/blockGitHubActionsCI.ts

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const blockGitHubActionsCI = base.createBlock({
1818
steps: z.array(
1919
z.intersection(
2020
z.object({
21+
env: z.record(z.string(), z.string()).optional(),
2122
if: z.string().optional(),
2223
with: z.record(z.string(), z.string()).optional(),
2324
}),

0 commit comments

Comments
 (0)