Add helm chart ci #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Helm Chart CI | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
jobs: | |
helm-lint-and-template: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Helm | |
uses: azure/[email protected] | |
with: | |
version: 'latest' | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
check-latest: true | |
# - name: Set up chart-testing | |
# uses: helm/[email protected] | |
# - name: Run chart-testing (list-changed) | |
# id: list-changed | |
# run: | | |
# changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | |
# if [[ -n "$changed" ]]; then | |
# echo "changed=true" >> "$GITHUB_OUTPUT" | |
# fi | |
# - name: Run chart-testing (lint) | |
# if: steps.list-changed.outputs.changed == 'true' | |
# run: ct lint --target-branch ${{ github.event.repository.default_branch }} | |
- name: Generate Helm Template | |
id: helm-template | |
run: | | |
OUTPUT=$(helm template .) | |
echo "::set-output name=helm_output::$OUTPUT" | |
- uses: actions/github-script@v6 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: '| | |
**Helm Template Output:** | |
``` | |
${{ steps.helm-template.outputs.helm_output }} | |
``` | |
' | |
}) | |
- name: Pre-commit Checks | |
uses: pre-commit/[email protected] |