Skip to content

Commit b51c356

Browse files
authored
Add submodules support to health.yaml (#223)
* Add submodules support to `health.yaml` * Forward parameter
1 parent d7aaecb commit b51c356

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/health.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ on:
8383
default: false
8484
required: false
8585
type: boolean
86+
checkout_submodules:
87+
description: Whether to checkout submodules of git repositories.
88+
default: false
89+
required: false
90+
type: boolean
8691

8792
jobs:
8893
version:
@@ -95,7 +100,7 @@ jobs:
95100
warn_on: ${{ inputs.warn_on }}
96101
local_debug: ${{ inputs.local_debug }}
97102
use-flutter: ${{ inputs.use-flutter }}
98-
103+
checkout_submodules: ${{ inputs.checkout_submodules }}
99104
changelog:
100105
if: ${{ contains(inputs.checks, 'changelog') }}
101106
uses: ./.github/workflows/health_base.yaml
@@ -106,6 +111,7 @@ jobs:
106111
warn_on: ${{ inputs.warn_on }}
107112
local_debug: ${{ inputs.local_debug }}
108113
use-flutter: ${{ inputs.use-flutter }}
114+
checkout_submodules: ${{ inputs.checkout_submodules }}
109115

110116
license:
111117
if: ${{ contains(inputs.checks, 'license') }}
@@ -117,6 +123,7 @@ jobs:
117123
warn_on: ${{ inputs.warn_on }}
118124
local_debug: ${{ inputs.local_debug }}
119125
use-flutter: ${{ inputs.use-flutter }}
126+
checkout_submodules: ${{ inputs.checkout_submodules }}
120127

121128
coverage:
122129
if: ${{ contains(inputs.checks, 'coverage') }}
@@ -130,6 +137,7 @@ jobs:
130137
coverage_web: ${{ inputs.coverage_web }}
131138
local_debug: ${{ inputs.local_debug }}
132139
use-flutter: ${{ inputs.use-flutter }}
140+
checkout_submodules: ${{ inputs.checkout_submodules }}
133141

134142
breaking:
135143
if: ${{ contains(inputs.checks, 'breaking') }}
@@ -141,6 +149,7 @@ jobs:
141149
warn_on: ${{ inputs.warn_on }}
142150
local_debug: ${{ inputs.local_debug }}
143151
use-flutter: ${{ inputs.use-flutter }}
152+
checkout_submodules: ${{ inputs.checkout_submodules }}
144153

145154
do-not-submit:
146155
if: ${{ contains(inputs.checks, 'do-not-submit') }}
@@ -152,6 +161,7 @@ jobs:
152161
warn_on: ${{ inputs.warn_on }}
153162
local_debug: ${{ inputs.local_debug }}
154163
use-flutter: ${{ inputs.use-flutter }}
164+
checkout_submodules: ${{ inputs.checkout_submodules }}
155165

156166
comment:
157167
needs: [version, changelog, license, coverage, breaking, do-not-submit]

.github/workflows/health_base.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ on:
5050
default: false
5151
required: false
5252
type: boolean
53+
checkout_submodules:
54+
description: Whether to checkout submodules of git repositories.
55+
default: false
56+
required: false
57+
type: boolean
5358

5459
jobs:
5560
health:
@@ -64,11 +69,13 @@ jobs:
6469
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
6570
with:
6671
path: current_repo/
72+
submodules: ${{ inputs.checkout_submodules }}
6773

6874
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
6975
with:
7076
ref: ${{ github.event.pull_request.base.ref }}
7177
path: base_repo/
78+
submodules: ${{ inputs.checkout_submodules }}
7279
if: ${{ inputs.check == 'coverage' }} || ${{ inputs.check == 'breaking' }}
7380

7481
- run: mkdir -p current_repo/output/

0 commit comments

Comments
 (0)