forked from AlabamaWaterInstitute/tethysportal-ciroh
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.44 KB
/
helm_chart_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#https://stackoverflow.com/questions/76037078/why-is-my-github-action-on-paths-also-triggered-when-pushing-a-new-tag
name: helm_chart_lint_release
# Push to docker hub if tag has been created.
on:
workflow_dispatch:
push:
tags:
- '*'
branches:
- '**'
paths:
- 'charts/**'
jobs:
# lint and test chart
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: check_chart_file_changed_files
id: changed-chart-files-yaml
uses: tj-actions/changed-files@v37
with:
files_yaml: |
charts:
- charts/**
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.6.3
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Artifact Hub lint
run: |
curl -s https://api.github.com/repos/artifacthub/hub/releases/latest | grep -E 'browser_download_url' | grep linux_amd64.tar.gz\" | grep -Eo 'https://[^\"]*' | xargs wget -O - | tar -xz
./ah lint -p charts/ciroh || exit 1
rm -f ./ah
# release chart
release:
runs-on: ubuntu-latest
needs: lint-test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Publish Helm charts
uses: stefanprodan/helm-gh-pages@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
charts_dir: charts