2020-12-22 19:12:39 +00:00
|
|
|
name: Helm
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-02-18 10:27:10 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release-*
|
2020-12-22 19:12:39 +00:00
|
|
|
paths:
|
|
|
|
- 'deploy/charts/**'
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'deploy/charts/**'
|
2021-02-18 10:27:10 +00:00
|
|
|
workflow_dispatch: {}
|
2020-12-22 19:12:39 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint-and-test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-07 08:06:46 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-12-22 19:12:39 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Generate chart
|
|
|
|
run: |
|
2021-02-18 10:27:10 +00:00
|
|
|
make helm.generate
|
2020-12-22 19:12:39 +00:00
|
|
|
|
|
|
|
- name: Set up Helm
|
2022-08-03 14:30:45 +00:00
|
|
|
uses: azure/setup-helm@v3.3
|
2020-12-22 19:12:39 +00:00
|
|
|
with:
|
|
|
|
version: v3.4.2
|
|
|
|
|
2022-09-13 05:30:34 +00:00
|
|
|
- uses: actions/setup-python@v4.2.0
|
2020-12-22 19:12:39 +00:00
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
|
|
|
|
- name: Set up chart-testing
|
2022-08-15 19:46:41 +00:00
|
|
|
uses: helm/chart-testing-action@v2.3.0
|
2020-12-22 19:12:39 +00:00
|
|
|
|
|
|
|
- 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: Run chart-testing (lint)
|
|
|
|
run: ct lint --config=.github/ci/ct.yaml
|
|
|
|
|
2021-04-30 22:23:51 +00:00
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-07 08:06:46 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-04-30 22:23:51 +00:00
|
|
|
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
|
2022-08-03 14:30:45 +00:00
|
|
|
uses: azure/setup-helm@v3.3
|
2021-04-30 22:23:51 +00:00
|
|
|
with:
|
|
|
|
version: v3.4.2
|
|
|
|
|
|
|
|
- name: Generate chart
|
|
|
|
run: |
|
|
|
|
make helm.generate
|
|
|
|
|
|
|
|
- name: Run chart-releaser
|
2022-04-04 08:05:46 +00:00
|
|
|
uses: helm/chart-releaser-action@v1.4.0
|
2021-05-05 19:20:07 +00:00
|
|
|
if: github.ref == 'refs/heads/main'
|
2021-04-30 22:23:51 +00:00
|
|
|
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
|