2021-07-14 19:10:41 +00:00
|
|
|
name: helm-release
|
|
|
|
on:
|
|
|
|
push:
|
2021-08-20 22:06:58 +00:00
|
|
|
tags:
|
2022-04-27 03:52:45 +00:00
|
|
|
- 'kyverno-chart-v*'
|
|
|
|
- 'kyverno-policies-chart-v*'
|
2021-07-14 19:10:41 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-07-21 00:06:56 +00:00
|
|
|
helm-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-01-13 05:23:05 +00:00
|
|
|
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0
|
2021-07-21 00:06:56 +00:00
|
|
|
|
|
|
|
- name: Unshallow
|
|
|
|
run: git fetch --prune --unshallow
|
|
|
|
|
2022-01-13 05:23:05 +00:00
|
|
|
- uses: actions/setup-python@f38219332975fe8f9c04cca981d674bf22aea1d3 # v2.3.1
|
2021-07-21 00:06:56 +00:00
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
|
|
|
|
- name: Set up chart-testing
|
2022-01-13 05:23:05 +00:00
|
|
|
uses: helm/chart-testing-action@b0d4458c71155b54fcf33e11dd465dc923550009 # v2.0.1
|
2021-07-21 00:06:56 +00:00
|
|
|
|
|
|
|
- name: Run chart-testing (lint)
|
|
|
|
run: ct lint --target-branch=main --check-version-increment=false
|
|
|
|
|
2021-07-14 19:10:41 +00:00
|
|
|
create-release:
|
|
|
|
runs-on: ubuntu-latest
|
2021-07-21 00:06:56 +00:00
|
|
|
needs: helm-tests
|
2021-07-14 19:10:41 +00:00
|
|
|
steps:
|
2021-07-19 20:01:17 +00:00
|
|
|
- name: Checkout
|
2022-01-13 05:23:05 +00:00
|
|
|
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0
|
2021-07-19 20:01:17 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2021-07-14 19:10:41 +00:00
|
|
|
- name: Install Helm
|
2022-01-13 05:23:05 +00:00
|
|
|
uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab # v1.1
|
2021-07-14 19:10:41 +00:00
|
|
|
with:
|
2021-07-20 07:15:33 +00:00
|
|
|
version: v3.4.1
|
2021-07-14 19:10:41 +00:00
|
|
|
|
2022-04-27 03:52:45 +00:00
|
|
|
- name: Set version
|
|
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Create charts tmp directory
|
|
|
|
run: |
|
|
|
|
mkdir charts-tmp
|
|
|
|
if [[ "$RELEASE_VERSION" = "kyverno-policies-chart-v"* ]]; then
|
|
|
|
cp -a charts/kyverno-policies charts-tmp/kyverno-policies
|
|
|
|
fi
|
|
|
|
if [[ "$RELEASE_VERSION" = "kyverno-chart-v"* ]]; then
|
|
|
|
cp -a charts/kyverno charts-tmp/kyverno
|
|
|
|
fi
|
|
|
|
|
2021-07-14 19:10:41 +00:00
|
|
|
- name: Run chart-releaser
|
2022-02-21 15:50:42 +00:00
|
|
|
uses: stefanprodan/helm-gh-pages@b43a8719cc63fdb3aa943cc57359ab19118eab3f #v1.5.0
|
2021-07-14 19:10:41 +00:00
|
|
|
with:
|
2021-07-20 19:49:37 +00:00
|
|
|
token: "${{ secrets.GITHUB_TOKEN }}"
|
2022-02-21 15:50:42 +00:00
|
|
|
linting: off
|
2022-04-27 03:52:45 +00:00
|
|
|
charts_dir: charts-tmp
|