-
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.
- Loading branch information
1 parent
bbd267a
commit 841fc93
Showing
1 changed file
with
58 additions
and
0 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,58 @@ | ||
--- | ||
name: helm | ||
on: | ||
- push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: set up helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.13.0 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: run chart-testing (lint) | ||
run: ct lint --all | ||
|
||
- name: create kind cluster | ||
uses: helm/[email protected] | ||
|
||
- name: run chart-testing (install) | ||
run: ct install --all | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: set up helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.13.0 | ||
|
||
- name: login to github container registry using helm | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io/snapp-incubator/nats-blackbox-exporter --username ${{ github.repository_owner }} --password-stdin | ||
- name: package nats-blackbox-exporter helm chart | ||
run: | | ||
version=${{ github.ref_name }} | ||
helm package --version "${version##v}" --app-version "${version}" ./charts/nats-blackbox-exporter | ||
- name: publish nats-blackbox-exporter chart to github container registry | ||
run: | | ||
version=${{ github.ref_name }} | ||
helm push "nats-blackbox-exporter-${version##v}".tgz oci://ghcr.io/snapp-incubator/mqtt-blackbox-exporter-chart |