-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[housekeeping]: Update Testing Action (#36)
- Loading branch information
1 parent
b0f3e34
commit a160be0
Showing
6 changed files
with
76 additions
and
60 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -4,8 +4,46 @@ on: | |
branches: | ||
- master | ||
jobs: | ||
documentation: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: alpine | ||
steps: | ||
- name: Install Dependencies | ||
run: | | ||
apk add jq git curl | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Fetch history | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Install Helm Docs | ||
run: | | ||
curl -s -L -o /usr/local/bin/helm-docs.tar.gz "https://github.com/norwoodj/helm-docs/releases/download/$(curl --silent "https://api.github.com/repos/norwoodj/helm-docs/releases/latest" | jq -r .tag_name)/helm-docs_$(curl --silent "https://api.github.com/repos/norwoodj/helm-docs/releases/latest" | jq -r .tag_name | cut -d "v" -f2-)_Linux_x86_64.tar.gz" | ||
cd /usr/local/bin/ && tar xfv helm-docs.tar.gz | ||
chmod +x ./helm-docs | ||
- name: Update Documentation | ||
run: | | ||
git status | ||
CHARTS_ROOT="./charts" | ||
if [ -d "${CHARTS_ROOT}" ]; then | ||
## Generate Documentation | ||
helm-docs | ||
## Push Changes | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
git add -A | ||
git commit -sam "Update Documentation" || true | ||
git push || true | ||
else | ||
echo -e "\n\e[33m-- Root Direcoty not found: $CHART_ROOT\e[0m" && exit 0; | ||
fi | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- documentation | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
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 |
---|---|---|
|
@@ -9,27 +9,40 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetch history | ||
run: git fetch --prune --unshallow | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.5.0 | ||
|
||
- name: Chart Linting | ||
id: lint | ||
uses: helm/[email protected] | ||
- uses: actions/setup-python@v2 | ||
with: | ||
command: lint | ||
python-version: 3.7 | ||
|
||
- name: Setup Chart Linting | ||
id: lint | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct --config ./ct.yaml list-changed) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: Run chart-testing (lint) | ||
run: ct lint --config ./ct.yaml | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
# Only build a kind cluster if there are chart changes to test. | ||
if: steps.lint.outputs.changed == 'true' | ||
|
||
- name: Chart Installation | ||
uses: helm/[email protected] | ||
# Only test if there are any changes | ||
if: steps.lint.outputs.changed == 'true' | ||
with: | ||
command: install | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install --config ./ct.yaml | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
dry-release: | ||
runs-on: ubuntu-latest | ||
|
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
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