mirror of
https://ghproxy.com/https://github.com/truecharts/charts.git
synced 2026-07-27 20:00:18 +08:00
run prettier as pre-commit hook (#3264)
This commit is contained in:
committed by
GitHub
parent
c41dda9d32
commit
ded5a3c0e6
1
.github/workflows/charts-lint.yaml
vendored
1
.github/workflows/charts-lint.yaml
vendored
@@ -299,7 +299,6 @@ jobs:
|
||||
- name: Run chart-testing (lint)
|
||||
run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}"
|
||||
|
||||
|
||||
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
|
||||
lint_success:
|
||||
needs:
|
||||
|
||||
3
.github/workflows/charts-release.yaml
vendored
3
.github/workflows/charts-release.yaml
vendored
@@ -58,7 +58,6 @@ jobs:
|
||||
parthreads=$(($(nproc) * 2))
|
||||
parallel -j ${parthreads} .github/scripts/gen-docs.sh '2>&1' ::: ${CHARTS[@]}
|
||||
|
||||
|
||||
- name: Fix Pre-Commit issues
|
||||
shell: bash
|
||||
if: |
|
||||
@@ -170,7 +169,6 @@ jobs:
|
||||
parthreads=$(($(nproc) * 2))
|
||||
parallel -j ${parthreads} .github/scripts/build-catalog.sh '2>&1' ::: ${CHARTS[@]}
|
||||
|
||||
|
||||
- name: Generate docker-hub Catalog
|
||||
shell: bash
|
||||
if: |
|
||||
@@ -190,7 +188,6 @@ jobs:
|
||||
echo "Starting Catalog Validation"
|
||||
/usr/local/bin/catalog_validate validate --path "${PWD}/catalog"
|
||||
|
||||
|
||||
- name: Commit Catalog
|
||||
if: |
|
||||
steps.collect-changes.outputs.changesDetected == 'true'
|
||||
|
||||
7
.github/workflows/charts-test.yaml
vendored
7
.github/workflows/charts-test.yaml
vendored
@@ -168,7 +168,6 @@ jobs:
|
||||
run: |
|
||||
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
||||
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
||||
|
||||
@@ -213,11 +212,9 @@ jobs:
|
||||
run: |
|
||||
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
||||
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
||||
|
||||
|
||||
install-charts3:
|
||||
needs:
|
||||
- generate-install-matrix
|
||||
@@ -258,7 +255,6 @@ jobs:
|
||||
run: |
|
||||
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
||||
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
||||
|
||||
@@ -302,7 +298,6 @@ jobs:
|
||||
run: |
|
||||
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
||||
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
||||
|
||||
@@ -346,7 +341,6 @@ jobs:
|
||||
run: |
|
||||
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
||||
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
||||
|
||||
@@ -390,7 +384,6 @@ jobs:
|
||||
run: |
|
||||
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
||||
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config ".github/ct-install.yaml" --charts "${{ matrix.chart }}" --upgrade
|
||||
|
||||
|
||||
47
.github/workflows/general.security-scan.yaml
vendored
47
.github/workflows/general.security-scan.yaml
vendored
@@ -4,13 +4,12 @@ on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- master
|
||||
paths:
|
||||
- ".github/workflows/general.security-scan.yaml"
|
||||
- ".github/workflows/general.security-scan.yaml"
|
||||
schedule:
|
||||
- cron: "0 0 * * 0"
|
||||
|
||||
|
||||
jobs:
|
||||
directories: # Job that list subdirectories
|
||||
runs-on: ubuntu-latest
|
||||
@@ -24,29 +23,27 @@ jobs:
|
||||
run: echo "::set-output name=dir::$({ ls -d containers/apps/*/ & ls -d containers/base/*/; } | tr '\n' '\0' | xargs -0 -n 1 basename | jq -R -s -c 'split("\n")[:-1]')"
|
||||
# Define step output named dir base on ls command transformed to JSON thanks to jq
|
||||
|
||||
|
||||
scan_files:
|
||||
name: Scan Files
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
|
||||
- name: Run Trivy vulnerability scanner in repo mode
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
scan-type: 'fs'
|
||||
ignore-unfixed: true
|
||||
format: 'template'
|
||||
template: '@/contrib/sarif.tpl'
|
||||
output: 'trivy-repo-results.sarif'
|
||||
severity: 'CRITICAL'
|
||||
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@3e7e3b32d0fb8283594bb0a76cc60a00918b0969 # tag=v2
|
||||
with:
|
||||
sarif_file: 'trivy-repo-results.sarif'
|
||||
- name: Run Trivy vulnerability scanner in repo mode
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
scan-type: "fs"
|
||||
ignore-unfixed: true
|
||||
format: "template"
|
||||
template: "@/contrib/sarif.tpl"
|
||||
output: "trivy-repo-results.sarif"
|
||||
severity: "CRITICAL"
|
||||
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@3e7e3b32d0fb8283594bb0a76cc60a00918b0969 # tag=v2
|
||||
with:
|
||||
sarif_file: "trivy-repo-results.sarif"
|
||||
|
||||
scan_containers:
|
||||
name: Scan Containers
|
||||
@@ -57,8 +54,8 @@ jobs:
|
||||
dir: ${{fromJson(needs.directories.outputs.dir)}} # List matrix strategy from directories dynamically
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Container Security scan
|
||||
uses: Azure/container-scan@f9af925b897d8af5f7e0026b8bca9346261abc93 # tag=v0
|
||||
with:
|
||||
image-name: ghcr.io/${{ github.repository_owner }}/${{matrix.dir}}:latest
|
||||
severity-threshold: HIGH
|
||||
- name: Container Security scan
|
||||
uses: Azure/container-scan@f9af925b897d8af5f7e0026b8bca9346261abc93 # tag=v0
|
||||
with:
|
||||
image-name: ghcr.io/${{ github.repository_owner }}/${{matrix.dir}}:latest
|
||||
severity-threshold: HIGH
|
||||
|
||||
2
.github/workflows/pr-validate.yaml
vendored
2
.github/workflows/pr-validate.yaml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
uses: ./.github/workflows/charts-test.yaml
|
||||
needs:
|
||||
- pr-metadata
|
||||
# - charts-changelog
|
||||
# - charts-changelog
|
||||
- charts-lint
|
||||
with:
|
||||
checkoutCommit: ${{ needs.charts-changelog.outputs.commitHash }}
|
||||
|
||||
14
.github/workflows/prune.yaml
vendored
14
.github/workflows/prune.yaml
vendored
@@ -8,10 +8,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: "prune old releases"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/delete-package-versions@a31a43afa6c2d3afdf8b5f1e311b2dc75585932e # tag=v3
|
||||
with:
|
||||
min-versions-to-keep: 200
|
||||
- name: Checkout
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/delete-package-versions@a31a43afa6c2d3afdf8b5f1e311b2dc75585932e # tag=v3
|
||||
with:
|
||||
min-versions-to-keep: 200
|
||||
|
||||
80
.github/workflows/renovate-bump.yaml
vendored
80
.github/workflows/renovate-bump.yaml
vendored
@@ -3,9 +3,9 @@ name: "Renovate: Bump on Push"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'renovate/**'
|
||||
- "renovate/**"
|
||||
tags-ignore:
|
||||
- '**'
|
||||
- "**"
|
||||
|
||||
jobs:
|
||||
renovate-bump:
|
||||
@@ -41,44 +41,44 @@ jobs:
|
||||
run: echo '${{ toJson(steps.filter.outputs) }}' > changes.json
|
||||
- name: Bump
|
||||
run: |
|
||||
APPS=$(jq --raw-output '.changed_files | fromjson | .[] |= sub("(?<filepath>(?<first_directory>(?<root1>[\/]?)[^\/]+\/)(?<second_directory>(?<root2>[\/]?)[^\/]+\/)(?<third_directory>(?<root3>[\/]?)[^\/]+)(?<extra_paths>.+))"; "\(.third_directory)") | unique' changes.json | jq -r '.[]')
|
||||
echo "changed apps: ${APPS[*]}"
|
||||
for chart in ${APPS[*]}
|
||||
do
|
||||
if [[ "${chart}" == '.gitkee' ]]; then
|
||||
echo "Skipping..."
|
||||
return
|
||||
elif test -f "./charts/stable/${chart}/Chart.yaml"; then
|
||||
train="stable"
|
||||
elif test -f "./charts/incubator/${chart}/Chart.yaml"; then
|
||||
train="incubator"
|
||||
elif test -f "./charts/SCALE/${chart}/Chart.yaml"; then
|
||||
train="SCALE"
|
||||
elif test -f "./charts/library/${chart}/Chart.yaml"; then
|
||||
train="library"
|
||||
elif test -f "./charts/dependency/${chart}/Chart.yaml"; then
|
||||
train="dependency"
|
||||
elif test -f "./charts/core/${chart}/Chart.yaml"; then
|
||||
train="core"
|
||||
elif test -f "./charts/games/${chart}/Chart.yaml"; then
|
||||
train="games"
|
||||
elif test -f "./charts/enterprise/${chart}/Chart.yaml"; then
|
||||
train="enterprise"
|
||||
else
|
||||
train="incubator"
|
||||
fi
|
||||
echo "Comparing versions for ${train}/${chart}"
|
||||
master=$(cat ./master/charts/${train}/${chart}/Chart.yaml | grep "^version")
|
||||
current=$(cat ./charts/${train}/${chart}/Chart.yaml | grep "^version")
|
||||
echo "master version: ${master}"
|
||||
echo "current version: ${current}"
|
||||
if [[ "${master}" != "${current}" ]]; then
|
||||
echo "Version does not have to be bumped"
|
||||
else
|
||||
echo "Bumping patch version for ${train}/${chart}"
|
||||
./tools/bump.sh patch ./charts/${train}/${chart}
|
||||
fi
|
||||
done
|
||||
APPS=$(jq --raw-output '.changed_files | fromjson | .[] |= sub("(?<filepath>(?<first_directory>(?<root1>[\/]?)[^\/]+\/)(?<second_directory>(?<root2>[\/]?)[^\/]+\/)(?<third_directory>(?<root3>[\/]?)[^\/]+)(?<extra_paths>.+))"; "\(.third_directory)") | unique' changes.json | jq -r '.[]')
|
||||
echo "changed apps: ${APPS[*]}"
|
||||
for chart in ${APPS[*]}
|
||||
do
|
||||
if [[ "${chart}" == '.gitkee' ]]; then
|
||||
echo "Skipping..."
|
||||
return
|
||||
elif test -f "./charts/stable/${chart}/Chart.yaml"; then
|
||||
train="stable"
|
||||
elif test -f "./charts/incubator/${chart}/Chart.yaml"; then
|
||||
train="incubator"
|
||||
elif test -f "./charts/SCALE/${chart}/Chart.yaml"; then
|
||||
train="SCALE"
|
||||
elif test -f "./charts/library/${chart}/Chart.yaml"; then
|
||||
train="library"
|
||||
elif test -f "./charts/dependency/${chart}/Chart.yaml"; then
|
||||
train="dependency"
|
||||
elif test -f "./charts/core/${chart}/Chart.yaml"; then
|
||||
train="core"
|
||||
elif test -f "./charts/games/${chart}/Chart.yaml"; then
|
||||
train="games"
|
||||
elif test -f "./charts/enterprise/${chart}/Chart.yaml"; then
|
||||
train="enterprise"
|
||||
else
|
||||
train="incubator"
|
||||
fi
|
||||
echo "Comparing versions for ${train}/${chart}"
|
||||
master=$(cat ./master/charts/${train}/${chart}/Chart.yaml | grep "^version")
|
||||
current=$(cat ./charts/${train}/${chart}/Chart.yaml | grep "^version")
|
||||
echo "master version: ${master}"
|
||||
echo "current version: ${current}"
|
||||
if [[ "${master}" != "${current}" ]]; then
|
||||
echo "Version does not have to be bumped"
|
||||
else
|
||||
echo "Bumping patch version for ${train}/${chart}"
|
||||
./tools/bump.sh patch ./charts/${train}/${chart}
|
||||
fi
|
||||
done
|
||||
- name: Cleanup
|
||||
run: |
|
||||
rm -rf changes.json
|
||||
|
||||
2
.github/workflows/schedule-sync-labels.yaml
vendored
2
.github/workflows/schedule-sync-labels.yaml
vendored
@@ -20,6 +20,6 @@ jobs:
|
||||
uses: EndBug/label-sync@852ef5d7a242975b02f1832ad53dc45ca635c3e4 # tag=v2
|
||||
with:
|
||||
config-file: |
|
||||
https://raw.githubusercontent.com/truecharts/.github/main/.github/labels.yaml
|
||||
https://raw.githubusercontent.com/truecharts/.github/main/.github/labels.yaml
|
||||
token: "${{ secrets.BOT_TOKEN }}"
|
||||
delete-other-labels: true
|
||||
|
||||
Reference in New Issue
Block a user