Merge branch 'main' into immich-update

This commit is contained in:
Tommy 2024-11-11 20:07:55 +01:00
commit b496232575
Signed by: tommy
SSH key fingerprint: SHA256:1LWgQT3QPHIT29plS8jjXc3S1FcE/4oGvsx3Efxs6Uc

View file

@ -12,7 +12,8 @@ on:
- 'main' - 'main'
jobs: jobs:
chart-testing: charts-changed:
name: Get Charts being Changed
runs-on: flakes-action runs-on: flakes-action
steps: steps:
- name: Checkout - name: Checkout
@ -32,9 +33,10 @@ jobs:
reposChanged: ${{ steps.changed-charts.outputs.reposChanged }} reposChanged: ${{ steps.changed-charts.outputs.reposChanged }}
changesExist: ${{ env.changesExist }} changesExist: ${{ env.changesExist }}
validation: validate-linting:
needs: chart-testing name: "Validate: Linting"
if: needs.chart-testing.outputs.changesExist == 'true' needs: charts-changed
if: needs.charts-changed.outputs.changesExist == 'true'
runs-on: flakes-action runs-on: flakes-action
steps: steps:
- name: Checkout - name: Checkout
@ -42,20 +44,50 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Process Changed Repositories - name: Linting Changed Repositories
run: | run: |
repos='${{ needs.chart-testing.outputs.reposChanged }}' repos='${{ needs.charts-changed.outputs.reposChanged }}'
for repo in $(echo $repos | jq -r '.[]'); do for repo in $(echo $repos | jq -r '.[]'); do
echo "Linting $repo" echo "Linting $repo"
ct --config .forgejo/ct.yaml lint "$repo" ct --config .forgejo/ct.yaml lint "$repo"
done
validate-audit:
name: "Validate: Audit"
needs: charts-changed
if: needs.charts-changed.outputs.changesExist == 'true'
runs-on: flakes-action
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Auditing changed charts
run: |
repos='${{ needs.charts-changed.outputs.reposChanged }}'
for repo in $(echo $repos | jq -r '.[]'); do
echo "Auditing $repo" echo "Auditing $repo"
polaris audit --helm-chart "$repo" \ polaris audit --helm-chart "$repo" \
--helm-values "$repo/values.yaml" \ --helm-values "$repo/values.yaml" \
--format pretty \ --format pretty \
--set-exit-code-on-danger \ --set-exit-code-on-danger \
--set-exit-code-below-score 90 --set-exit-code-below-score 90
done
validate-api:
name: "Validate: Outdated APIs"
needs: charts-changed
if: needs.charts-changed.outputs.changesExist == 'true'
runs-on: flakes-action
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checking changed charts for outdated APIs
run: |
repos='${{ needs.charts-changed.outputs.reposChanged }}'
for repo in $(echo $repos | jq -r '.[]'); do
echo "Checking deprecated apiVersions for $repo" echo "Checking deprecated apiVersions for $repo"
helm template "$repo" -f "$repo/ci/pluto-values.yaml" | pluto detect - --ignore-deprecations helm template "$repo" -f "$repo/ci/pluto-values.yaml" | pluto detect - --ignore-deprecations
done done