1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00
external-secrets/.github/workflows/helm.yml
Moritz Johner 22bb26cfa1
chore: release 0.9.8 (#2826)
also downgrade `chart-testing-action`: CI pipeline [1] fails with "Unable to validate cosign version v2.0.0".
That is because the v2.0.0 bootstrap version [2] is not accessible any more, it
either got deleted or permissions got changed.

[1] https://github.com/external-secrets/external-secrets/actions/runs/6705828636/job/18221053949?pr=2826
[2] https://storage.googleapis.com/cosign-releases/v2.0.0/cosign-linux-amd64

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
2023-10-31 13:42:55 +01:00

99 lines
2.6 KiB
YAML

name: Helm
on:
push:
branches:
- main
- release-*
paths:
- 'deploy/charts/**'
- 'deploy/crds'
pull_request:
paths:
- 'deploy/charts/**'
- 'deploy/crds'
workflow_dispatch: {}
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate chart
run: |
make helm.generate
- name: Set up Helm
uses: azure/setup-helm@v3.5
with:
version: v3.4.2
- uses: actions/setup-python@v4.7.1
with:
python-version: 3.7
- name: Set up chart-testing
# before upgrading, please see if this has been fixed:
# https://github.com/helm/chart-testing-action/issues/132
uses: helm/chart-testing-action@v2.3.1
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config=.github/ci/ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Install chart unittest
run: |
helm env
helm plugin install https://github.com/helm-unittest/helm-unittest
- name: Run chart-testing (lint)
run: ct lint --config=.github/ci/ct.yaml
- name: Create kind cluster
uses: helm/kind-action@v1.8.0
if: steps.list-changed.outputs.changed == 'true'
- name: Run chart-testing (install)
run: ct install --config=.github/ci/ct.yaml --charts deploy/charts/external-secrets
if: steps.list-changed.outputs.changed == 'true'
- name: Run unitests
if: steps.list-changed.outputs.changed == 'true'
run: make helm.test
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Set up Helm
uses: azure/setup-helm@v3.4
with:
version: v3.4.2
- name: Generate chart
run: |
make helm.generate
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
if: |
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release-')
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}"
with:
charts_dir: deploy/charts
charts_repo_url: https://charts.external-secrets.io