Add helm chart ci #11
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: | |
contents: read | |
pull-requests: write | |
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: Generate Helm Template and Write to File | |
run: helm template . > helm_output.yaml | |
- name: Upload Helm Template as Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: helm-template-output | |
path: helm_output.yaml | |
- name: Download Helm Template Artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: helm-template-output | |
- name: Read Helm Output File | |
id: helm-output | |
run: echo "::set-output name=helm_output::$(cat helm_output.yaml)" | |
- name: Create or Update Comment with Helm Template | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
**Helm Template Output:** | |
``` | |
${{ steps.helm-output.outputs.helm_output }} | |
``` | |
reactions: 'eyes' # Emoji reaction | |
- name: Pre-commit Checks | |
uses: pre-commit/[email protected] |