-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add actions for init release (#1)
- Loading branch information
Showing
11 changed files
with
929 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: CI | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
call-lint: | ||
uses: ./.github/workflows/linter.yaml | ||
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Lint and Test Charts | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ct_configfile: | ||
description: location of the ct config file | ||
default: ct.yaml | ||
required: false | ||
type: string | ||
ct_check_version_increment: | ||
description: whether to check for version bump requirement | ||
default: false | ||
required: false | ||
type: boolean | ||
helm_version: | ||
description: version of the helm binary | ||
default: v3.8.2 | ||
required: false | ||
type: string | ||
|
||
env: | ||
CT_CONFIGFILE: ${{ inputs.ct_configfile }} | ||
|
||
jobs: | ||
lint-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: ${{ inputs.helm_version }} | ||
|
||
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and | ||
# yamllint (https://github.com/adrienverge/yamllint) which require Python | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
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_CONFIGFILE}" --check-version-increment=${{ inputs.ct_check_version_increment }} |
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,42 @@ | ||
name: Lint Code Base | ||
|
||
# Documentation: | ||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
filter_regex_include: | ||
description: this sets the scope of the super linter | ||
default: ".*" | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
build: | ||
name: Lint Code Base | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check Docs | ||
run: | | ||
docker run --rm --volume "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.8.1 | ||
if ! git diff --exit-code; then | ||
echo "Documentation not up to date. Please run helm-docs and commit changes!" >&2 | ||
exit 1 | ||
fi | ||
- name: Lint Code Base | ||
uses: docker://github/super-linter:v3.12.0 | ||
env: | ||
FILTER_REGEX_EXCLUDE: .*(README\.md|Chart\.yaml|NOTES.txt).* | ||
FILTER_REGEX_INCLUDE: ${{ inputs.filter_regex_include }} | ||
VALIDATE_ALL_CODEBASE: false | ||
VALIDATE_JSCPD: false | ||
VALIDATE_KUBERNETES_KUBEVAL: false | ||
VALIDATE_YAML: false | ||
DEFAULT_BRANCH: main | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
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,40 @@ | ||
name: Release Charts | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "charts/**" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.5.2 | ||
|
||
- name: Add dependency chart repos | ||
run: | | ||
helm repo add grafana https://grafana.github.io/helm-charts | ||
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
charts_dir: charts | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
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,23 @@ | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- 'README.md' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
cp -f README.md ${{ runner.temp }}/README.md | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: gh-pages | ||
- run: | | ||
cp -f ${{ runner.temp }}/README.md . | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
git add README.md | ||
git commit --signoff -m "Sync README from main" | ||
git push |
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
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
Oops, something went wrong.