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

chore(helm): actions for charts #102

Merged
merged 1 commit into from
Jan 5, 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
45 changes: 45 additions & 0 deletions .github/workflows/charts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test Charts
on:
- pull_request
- push
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
chart-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: azure/setup-helm@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
check-latest: true
- uses: helm/chart-testing-action@v2
- name: chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deploy/charts)
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deploy/charts --check-version-increment=false --github-groups
- uses: helm/kind-action@v1
if: steps.list-changed.outputs.changed == 'true'
- name: chart-testing (install)
terinjokes marked this conversation as resolved.
Show resolved Hide resolved
if: steps.list-changed.outputs.changed == 'true' && ! startsWith(github.ref, 'refs/tags/v')
run: |
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.crds.yaml
kubectl apply -f ./deploy/crds
ct install --target-branch ${{ github.event.repository.default_branch }} --chart-dirs deploy/charts --github-groups
- name: helm package
run: helm package deploy/charts/origin-ca-issuer
- name: helm publish
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login -u ${{ github.actor }} --password-stdin ghcr.io
helm push origin-ca-issuer-*.tgz oci://ghcr.io/cloudflare/origin-ca-issuer-charts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would allow users to use this chart via helm install my-origin-ca-issuer oci://ghcr.io/cloudflare/origin-ca-issuer-charts/origin-ca-issuer --version 0.x.y which is a bit verbose, but would allow for additional charts (eg, "option 4") in this project in the future.

3 changes: 3 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Docker
on:
- pull_request
- push
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docker:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Test
on:
- pull_request
- push
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
unit:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion deploy/charts/origin-ca-issuer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
apiVersion: v1
apiVersion: v2
type: application
name: origin-ca-issuer
version: 0.5.1
appVersion: 0.6.1
description: A Helm chart for origin-ca-issuer
home: https://github.com/cloudflare/origin-ca-issuer
maintainers:
- name: terinjokes
keywords:
- cert-manager
- cloudflare
Expand Down
Loading