diff --git a/.github/workflows/verify-helm.yaml b/.github/workflows/verify-helm.yaml new file mode 100644 index 0000000..b7b4182 --- /dev/null +++ b/.github/workflows/verify-helm.yaml @@ -0,0 +1,49 @@ +# Copyright 2024 cluetec GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: "Verify helm" + +on: + workflow_call: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + verify-helm-docs: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 + with: + allowed-endpoints: > + github.com:443 + disable-sudo: true + disable-telemetry: true + egress-policy: block + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 + with: + image: jnorwood/helm-docs:v1.12.0 + options: -v ${{ github.workspace }}/charts:/helm-docs + run: helm-docs + + - run: | + if $(git diff --quiet --exit-code); then + echo "Helm chart docs up to date" + else + echo "Helm chart docs not up to date:" + git diff + exit 1 + fi