generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
60 additions
and
13 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,47 @@ | ||
name: Lint and Test Charts | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
lint-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.14.4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
check-latest: true | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Run chart-testing (lint) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct lint --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
- name: Create kind cluster | ||
if: steps.list-changed.outputs.changed == 'true' | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (install) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct install --target-branch ${{ github.event.repository.default_branch }} |
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 |
---|---|---|
|
@@ -2,8 +2,8 @@ name: Releases Charts | |
|
||
on: | ||
push: | ||
# branches: | ||
# - release-* | ||
# branches: | ||
# - release-* | ||
paths: | ||
- charts/kwok/Chart.yaml | ||
- charts/stage-fast/Chart.yaml | ||
|
@@ -23,22 +23,22 @@ jobs: | |
- name: Install Helm | ||
uses: azure/setup-helm@v4 | ||
|
||
# - name: Login to GitHub Container Registry | ||
# run: | | ||
# helm registry login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io | ||
# - name: Release oci charts to ghcr.io | ||
# env: | ||
# IMAGE_PREFIX: ghcr.io/${{ github.repository }} | ||
# run: | | ||
# make oci-charts | ||
|
||
- name: Set up Git user | ||
# - name: Login to GitHub Container Registry | ||
# run: | | ||
# helm registry login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io | ||
# - name: Release oci charts to ghcr.io | ||
# env: | ||
# IMAGE_PREFIX: ghcr.io/${{ github.repository }} | ||
# run: | | ||
# make oci-charts | ||
|
||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Release charts | ||
uses: helm/[email protected] | ||
# if: ${{ env.PUSH == 'true' }} | ||
# if: ${{ env.PUSH == 'true' }} | ||
env: | ||
CR_RELEASE_NAME_TEMPLATE: "{{ .Name }}-helm-chart-{{ .Version }}" | ||
CR_MAKE_RELEASE_LATEST: false | ||
|
@@ -54,5 +54,5 @@ jobs: | |
if [ -z "${pkg:-}" ]; then | ||
break | ||
fi | ||
helm push "${pkg}" oci://ghcr.io/${{ github.repository }} | ||
helm push "${pkg}" oci://ghcr.io/${{ github.repository }}/charts | ||
done |