Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add submodules support to health.yaml #223

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/health.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ on:
default: false
required: false
type: boolean
checkout_submodules:
description: Whether to checkout submodules of git repositories.
default: false
required: false
type: boolean

jobs:
version:
Expand All @@ -95,7 +100,7 @@ jobs:
warn_on: ${{ inputs.warn_on }}
local_debug: ${{ inputs.local_debug }}
use-flutter: ${{ inputs.use-flutter }}

checkout_submodules: ${{ inputs.checkout_submodules }}
changelog:
if: ${{ contains(inputs.checks, 'changelog') }}
uses: ./.github/workflows/health_base.yaml
Expand All @@ -106,6 +111,7 @@ jobs:
warn_on: ${{ inputs.warn_on }}
local_debug: ${{ inputs.local_debug }}
use-flutter: ${{ inputs.use-flutter }}
checkout_submodules: ${{ inputs.checkout_submodules }}

license:
if: ${{ contains(inputs.checks, 'license') }}
Expand All @@ -117,6 +123,7 @@ jobs:
warn_on: ${{ inputs.warn_on }}
local_debug: ${{ inputs.local_debug }}
use-flutter: ${{ inputs.use-flutter }}
checkout_submodules: ${{ inputs.checkout_submodules }}

coverage:
if: ${{ contains(inputs.checks, 'coverage') }}
Expand All @@ -130,6 +137,7 @@ jobs:
coverage_web: ${{ inputs.coverage_web }}
local_debug: ${{ inputs.local_debug }}
use-flutter: ${{ inputs.use-flutter }}
checkout_submodules: ${{ inputs.checkout_submodules }}

breaking:
if: ${{ contains(inputs.checks, 'breaking') }}
Expand All @@ -141,6 +149,7 @@ jobs:
warn_on: ${{ inputs.warn_on }}
local_debug: ${{ inputs.local_debug }}
use-flutter: ${{ inputs.use-flutter }}
checkout_submodules: ${{ inputs.checkout_submodules }}

do-not-submit:
if: ${{ contains(inputs.checks, 'do-not-submit') }}
Expand All @@ -152,6 +161,7 @@ jobs:
warn_on: ${{ inputs.warn_on }}
local_debug: ${{ inputs.local_debug }}
use-flutter: ${{ inputs.use-flutter }}
checkout_submodules: ${{ inputs.checkout_submodules }}

comment:
needs: [version, changelog, license, coverage, breaking, do-not-submit]
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/health_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ on:
default: false
required: false
type: boolean
checkout_submodules:
description: Whether to checkout submodules of git repositories.
default: false
required: false
type: boolean

jobs:
health:
Expand All @@ -64,11 +69,13 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
path: current_repo/
submodules: ${{ inputs.checkout_submodules }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ github.event.pull_request.base.ref }}
path: base_repo/
submodules: ${{ inputs.checkout_submodules }}
if: ${{ inputs.check == 'coverage' }} || ${{ inputs.check == 'breaking' }}

- run: mkdir -p current_repo/output/
Expand Down