Update chart armonik #1290
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: Pre-commit | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
pre-commit: | |
name: Pre-commit checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure Terraform cache dir | |
run: | | |
mkdir -p "$HOME/.terraform.d/plugin-cache" | |
echo 'plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"' > "$HOME/.terraformrc" | |
- name: Install tfsec for static analysis of Terraform code to spot potential misconfigurations | |
run: | | |
curl -s https://raw.githubusercontent.com/aquasecurity/tfsec/master/scripts/install_linux.sh | bash | |
- name: Install Terraform Linter | |
uses: terraform-linters/setup-tflint@v3 | |
- name: Install helm-docs | |
uses: envoy/install-helm-docs@v1.0.0 | |
with: | |
version: 1.7.0 | |
- name: Install terraform-docs | |
uses: jaxxstorm/action-install-gh-release@v1.12.0 | |
with: # Grab the latest version | |
repo: terraform-docs/terraform-docs | |
tag: v0.18.0 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
- id: pre-commit | |
name: Pre Commit | |
uses: pre-commit/action@v3.0.1 | |
- name: Generate patch | |
if: ${{ failure() && steps.pre-commit.conclusion == 'failure' }} | |
run: | | |
git diff > patch.diff | |
- name: Upload Patch | |
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4 | |
if: ${{ failure() && steps.pre-commit.conclusion == 'failure' }} | |
with: | |
name: patch | |
path: ./patch.diff | |
- name: Apply Patch Instruction | |
if: ${{ failure() && steps.pre-commit.conclusion == 'failure' }} | |
run: | | |
echo 'Run the command `pre-commit` or download the patch file at the following URL:' | |
echo "https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}${PR:+?pr=$PR}#artifacts" | |
env: | |
PR: ${{ github.event.pull_request.number }} |