Skip to content

Update chart.yaml (#34) #27

Update chart.yaml (#34)

Update chart.yaml (#34) #27

name: Helm Publish
on:
push:
branches:
- 'main'
paths:
- 'helmchart/otel-add-on/Chart.yaml'
permissions:
contents: read
jobs:
noop:
runs-on: ubuntu-latest
steps:
- name: noop
run: echo "noop, because of 'The workflow must contain at least one job with no dependencies'"
test:
runs-on: ubuntu-latest
if: startsWith(github.event.head_commit.message, '[post-release]') || contains(github.event.head_commit.message, 'kedify/chart-yaml-update')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Smoke test helm renderability
run: |
set -o pipefail
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update open-telemetry
pushd ./helmchart/otel-add-on && helm dependency build && popd
helm template test ./helmchart/otel-add-on
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
if: startsWith(github.event.head_commit.message, '[post-release]') || contains(github.event.head_commit.message, 'kedify/chart-yaml-update')
needs: [test]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get tag
run: |
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update open-telemetry
pushd ./helmchart/otel-add-on && helm dependency build && popd
echo "current_tag=$(yq '.version' ./helmchart/otel-add-on/Chart.yaml)" >> $GITHUB_ENV
- name: Publish Helm chart
uses: appany/helm-oci-chart-releaser@v0.3.0
with:
name: otel-add-on
repository: kedify/charts
tag: ${{ env.current_tag }}
path: helmchart/otel-add-on
registry: ghcr.io
registry_username: kedify
registry_password: ${{ secrets.GITHUB_TOKEN }}
- name: Smoke test helm renderability of released helm chart
run: |
# exp-backoff - we wait for pages to become available here
for i in $(seq 16)
do
_sec=$(echo "1.5^$i" | bc)
echo "Waiting ${_sec} seconds.."
sleep ${_sec}
set -x
helm template test oci://ghcr.io/kedify/charts/otel-add-on --version ${{ env.current_tag }} && break
set +x
[ "$i" = "16" ] && exit 1
done