-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make workflows in this repository reusable from other repositories (#…
…1416) * Make linter a reusable workflow * Make lint and test with ct a resuable workflow * Make check-codeowners part of CI workflow Signed-off-by: György Krajcsovits <[email protected]>
- Loading branch information
Showing
4 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Check CODEOWNERS | ||
|
||
on: pull_request | ||
on: workflow_call | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: CI | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
call-check-codeowners: | ||
uses: ./.github/workflows/check-codeowners.yaml | ||
call-lint: | ||
uses: ./.github/workflows/linter.yml | ||
call-lint-test: | ||
uses: ./.github/workflows/lint-test.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
name: Lint and Test Charts | ||
|
||
on: pull_request | ||
on: | ||
workflow_call: | ||
inputs: | ||
ct_configfile: | ||
description: location of the ct config file | ||
default: ct.yaml | ||
required: false | ||
type: string | ||
|
||
env: | ||
CT_CONFIGFILE: ${{ inputs.ct_configfile }} | ||
|
||
jobs: | ||
lint-test: | ||
|
@@ -29,23 +39,23 @@ jobs: | |
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --config ct.yaml) | ||
changed=$(ct list-changed --config "${CT_CONFIGFILE}") | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: Run chart-testing (lint) | ||
run: ct lint --config ct.yaml | ||
run: ct lint --config "${CT_CONFIGFILE}" | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
run: | | ||
changed=$(ct list-changed --config ct.yaml) | ||
changed=$(ct list-changed --config "${CT_CONFIGFILE}") | ||
if [[ "$changed" == "charts/enterprise-metrics" ]]; then | ||
# Do not run `ct install` for enterprise-metrics | ||
exit 0 | ||
fi | ||
ct install --config ct.yaml | ||
ct install --config "${CT_CONFIGFILE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters