mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-23 15:39:02 +00:00
ci: Restructure PR validation
Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
parent
a101402e74
commit
8003e17a76
2
.github/ct-lint.yaml
vendored
2
.github/ct-lint.yaml
vendored
@ -10,5 +10,3 @@ chart-repos:
|
|||||||
- k8s-at-home-libraries=https://library-charts.k8s-at-home.com
|
- k8s-at-home-libraries=https://library-charts.k8s-at-home.com
|
||||||
- k8s-at-home=https://k8s-at-home.com/charts
|
- k8s-at-home=https://k8s-at-home.com/charts
|
||||||
- jetstack=https://charts.jetstack.io
|
- jetstack=https://charts.jetstack.io
|
||||||
additional-commands:
|
|
||||||
- ./hack/check-releasenotes.sh {{ .Path }}
|
|
||||||
|
51
.github/workflows/charts-update-readme.yaml
vendored
51
.github/workflows/charts-update-readme.yaml
vendored
@ -11,13 +11,36 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
outputs:
|
outputs:
|
||||||
commitHash:
|
commitHash:
|
||||||
description: "The commit hash to use in later jobs"
|
description: "The commit hash from the README.md upate"
|
||||||
value: ${{ jobs.generate-readme.outputs.commitHash }}
|
value: ${{ jobs.generate-readme.outputs.commitHash }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
validate-chart:
|
||||||
|
name: Validate chart.yaml
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Check changelog annotations
|
||||||
|
if: inputs.isRenovatePR != 'true'
|
||||||
|
run: |
|
||||||
|
CHARTS=(${{ inputs.modifiedCharts }})
|
||||||
|
for i in "${CHARTS[@]}"
|
||||||
|
do
|
||||||
|
printf "Checking release notes for chart %s\n" "${i}"
|
||||||
|
IFS='/' read -r -a chart_parts <<< "$i"
|
||||||
|
./.github/scripts/check-releasenotes.sh "charts/${chart_parts[0]}/${chart_parts[1]}"
|
||||||
|
echo ""
|
||||||
|
done
|
||||||
|
|
||||||
generate-readme:
|
generate-readme:
|
||||||
name: Generate chart README files
|
name: Generate chart README files
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- validate-chart
|
||||||
outputs:
|
outputs:
|
||||||
commitHash: ${{ steps.store-commit-hash.outputs.commit_hash }}
|
commitHash: ${{ steps.store-commit-hash.outputs.commit_hash }}
|
||||||
steps:
|
steps:
|
||||||
@ -38,18 +61,17 @@ jobs:
|
|||||||
wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb
|
wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb
|
||||||
sudo dpkg -i /tmp/helm-docs.deb
|
sudo dpkg -i /tmp/helm-docs.deb
|
||||||
|
|
||||||
# - name: Annotate Charts.yaml for Renovate PR's
|
- name: Annotate Charts.yaml for Renovate PR's
|
||||||
# run: |
|
if: inputs.isRenovatePR == 'true'
|
||||||
# export DEFAULT_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
|
run: |
|
||||||
# CHARTS=(${{ inputs.modifiedCharts }})
|
export DEFAULT_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
|
||||||
# for i in "${CHARTS[@]}"
|
CHARTS=(${{ inputs.modifiedCharts }})
|
||||||
# do
|
for i in "${CHARTS[@]}"
|
||||||
# IFS='/' read -r -a chart_parts <<< "$i"
|
do
|
||||||
# if [ -f "charts/${chart_parts[0]}"/"${chart_parts[1]}/Chart.yaml" ]; then
|
IFS='/' read -r -a chart_parts <<< "$i"
|
||||||
# ./hack/renovate-releasenotes.sh "charts/${chart_parts[0]}"/"${chart_parts[1]}"
|
./.github/scripts/renovate-releasenotes.sh "charts/${chart_parts[0]}/${chart_parts[1]}"
|
||||||
# fi
|
echo ""
|
||||||
# echo ""
|
done
|
||||||
# done
|
|
||||||
|
|
||||||
- name: Generate README for changed charts
|
- name: Generate README for changed charts
|
||||||
run: |
|
run: |
|
||||||
@ -57,10 +79,9 @@ jobs:
|
|||||||
for i in "${CHARTS[@]}"
|
for i in "${CHARTS[@]}"
|
||||||
do
|
do
|
||||||
printf "Rendering README for chart %s\n" "${i}"
|
printf "Rendering README for chart %s\n" "${i}"
|
||||||
echo " ${i}"
|
|
||||||
IFS='/' read -r -a chart_parts <<< "$i"
|
IFS='/' read -r -a chart_parts <<< "$i"
|
||||||
if [ -f "charts/${chart_parts[0]}"/"${chart_parts[1]}/Chart.yaml" ]; then
|
if [ -f "charts/${chart_parts[0]}"/"${chart_parts[1]}/Chart.yaml" ]; then
|
||||||
./hack/gen-helm-docs.sh "${chart_parts[0]}" "${chart_parts[1]}"
|
./.github/scripts/gen-helm-docs.sh "${chart_parts[0]}" "${chart_parts[1]}"
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user