From 0d01d3b051b8a013c426959ae91bd8f5d0492616 Mon Sep 17 00:00:00 2001 From: Engin Diri Date: Wed, 18 Sep 2024 12:57:21 +0200 Subject: [PATCH] feat: inital commit --- .github/workflows/lint-and-test.yml | 74 ----------------------------- 1 file changed, 74 deletions(-) delete mode 100644 .github/workflows/lint-and-test.yml diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml deleted file mode 100644 index 216c54a..0000000 --- a/.github/workflows/lint-and-test.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: ct-linting-and-testing -on: - pull_request: - paths: - - "charts/**" - -permissions: read-all - -jobs: - chart-test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0 - with: - fetch-depth: 0 - - - name: Set up Helm - uses: azure/setup-helm@f382f75448129b3be48f8121b9857be18d815a82 # tag=v3.4 - with: - version: v3.6.3 - - - name: Set up python - uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # tag=v4.3.0 - with: - python-version: 3.7 - - - name: Run Trivy vulnerability scanner in IaC mode - uses: aquasecurity/trivy-action@9ab158e8597f3b310480b9a69402b419bc03dbd5 # tag=0.8.0 - with: - scan-type: 'config' - hide-progress: false - format: 'sarif' - scan-ref: 'charts/silly-helm' - output: 'trivy-results.sarif' - exit-code: '1' - ignore-unfixed: true - - - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@678fc3afe258fb2e0cdc165ccf77b85719de7b3c # v2.1.33 - with: - sarif_file: 'trivy-results.sarif' - - - name: Setup Chart Linting - id: lint - uses: helm/chart-testing-action@afea100a513515fbd68b0e72a7bb0ae34cb62aec # tag=v2.3.1 - - - name: List changed charts - id: list-changed - run: | - ## If executed with debug this won't work anymore. - changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed) - charts=$(echo "$changed" | tr '\n' ' ' | xargs) - if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" - echo "::set-output name=changed_charts::$charts" - fi - - - 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/silly-helm || exit 1 - rm -f ./ah - - - name: Run chart-testing (lint) - run: ct lint --debug --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml - - - name: Create kind cluster - uses: helm/kind-action@9e8295d178de23cbfbd8fa16cf844eec1d773a07 # tag=v1.4.0 - if: steps.list-changed.outputs.changed == 'true' - - - name: Run chart-testing (install) - run: ct install --config ./.github/configs/ct-lint.yaml - if: steps.list-changed.outputs.changed == 'true'