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

Commit 48a71bc

Browse files
authored
fix: handle empty labels in groups (#9)
1 parent 0136edc commit 48a71bc

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/workflow/job.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ pub enum RunsOn {
4646
Target(Vec<String>),
4747
Group {
4848
group: String,
49-
#[serde(deserialize_with = "crate::common::scalar_or_vector")]
49+
// NOTE(ww): serde struggles with the null/empty case for custom
50+
// deserializers, so we help it out by telling it that it can default
51+
// to Vec::default.
52+
#[serde(deserialize_with = "crate::common::scalar_or_vector", default)]
5053
labels: Vec<String>,
5154
},
5255
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#choosing-runners-in-a-group
2+
name: learn-github-actions
3+
on: [push]
4+
jobs:
5+
check-bats-version:
6+
runs-on:
7+
group: ubuntu-runners
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-node@v4
11+
with:
12+
node-version: "14"
13+
- run: npm install -g bats
14+
- run: bats -v

0 commit comments

Comments
 (0)