Skip to content

Merge pull request #14 from CIROH-UA/fixing-deployment #35

Merge pull request #14 from CIROH-UA/fixing-deployment

Merge pull request #14 from CIROH-UA/fixing-deployment #35

#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