chore: PAYMCLOUD-194-keda-studio-configurazione-con-zero-pod #25
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: 🔎 Pre-commit Checks | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
# Allow manual trigger from GitHub UI | |
workflow_dispatch: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
# Required for hooks that need git history | |
fetch-depth: 0 | |
- name: Cache pre-commit environments | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: ~/.cache/pre-commit | |
# Cache key changes when pre-commit-config.yaml is modified | |
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
restore-keys: | | |
pre-commit- | |
- name: Install pre-commit | |
run: | | |
python -m pip install --upgrade pip | |
pip install pre-commit | |
- name: Install helm-docs | |
run: | | |
curl -L https://github.com/norwoodj/helm-docs/releases/download/v1.14.2/helm-docs_1.14.2_Linux_x86_64.tar.gz | tar xz | |
sudo mv helm-docs /usr/local/bin/helm-docs | |
helm-docs --version | |
- name: Set up Helm | |
# v4.2.0 - https://github.com/Azure/setup-helm/releases/tag/v4.2.0 | |
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 | |
with: | |
version: 'v3.16.3' | |
- name: Add helm repositories | |
run: | | |
helm repo add pagopa-microservice https://pagopa.github.io/aks-microservice-chart-blueprint | |
helm repo update | |
- name: Set up chart-testing | |
# v2.6.1 - https://github.com/helm/chart-testing-action/releases/tag/v2.6.0 | |
uses: helm/chart-testing-action@b43128a8b25298e1e7b043b78ea6613844e079b1 | |
# Pre-commit branch main | |
- name: Run pre-commit for MAIN branch | |
if: github.ref == 'refs/heads/main' | |
run: | | |
SKIP=helm-docs pre-commit run --all-files --color always | |
continue-on-error: false | |
# Pre-commit others branch | |
- name: Run pre-commit for non main branches | |
if: github.ref != 'refs/heads/main' | |
run: | | |
pre-commit run --all-files --color always | |
continue-on-error: false |