Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 199245e

Browse files
authored
bugfix: max-parallel can be an expression (#36)
1 parent 6672fb6 commit 199245e

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/workflow/job.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub enum StepBody {
142142
pub struct Strategy {
143143
pub matrix: Option<LoE<Matrix>>,
144144
pub fail_fast: Option<BoE>,
145-
pub max_parallel: Option<u64>,
145+
pub max_parallel: Option<LoE<u64>>,
146146
}
147147

148148
#[derive(Deserialize)]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# https://github.com/woodruffw/github-actions-models/issues/35
2+
3+
name: Test Workflow
4+
permissions: {}
5+
6+
on: ["push"]
7+
8+
# LIMIT = true|false
9+
10+
jobs:
11+
test:
12+
name: Test job
13+
runs-on: ubuntu-24.04
14+
strategy:
15+
# max-parallel: 1
16+
max-parallel: ${{ vars.LIMIT && 1 || 8 }}
17+
steps:
18+
- name: Test step
19+
shell: bash
20+
run: |
21+
echo "Hello World!"

0 commit comments

Comments
 (0)