mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-23 23:49:12 +00:00
[CI] Update CI
This commit is contained in:
parent
6e610d870c
commit
c8d6a4c612
37
.github/workflows/charts-auto-generate-docs.yaml
vendored
37
.github/workflows/charts-auto-generate-docs.yaml
vendored
@ -102,34 +102,56 @@ jobs:
|
|||||||
# Repo owner has commented /update-readme on a (fork-based) pull request
|
# Repo owner has commented /update-readme on a (fork-based) pull request
|
||||||
generate-readme-fork:
|
generate-readme-fork:
|
||||||
if:
|
if:
|
||||||
github.event_name == 'repository_dispatch' &&
|
github.event_name == 'repository_dispatch'
|
||||||
github.event.client_payload.slash_command.charts != ''
|
|
||||||
name: Auto-generate chart README
|
name: Auto-generate chart README
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
# Check out merge commit
|
- name: Checkout
|
||||||
- name: Fork based /ok-to-test checkout
|
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
|
ref: ${{ github.ref }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: dorny/paths-filter@v2
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
list-files: shell
|
||||||
|
filters: |
|
||||||
|
addedOrModified:
|
||||||
|
- added|modified: 'charts/**'
|
||||||
|
|
||||||
- name: Install Helm
|
- name: Install Helm
|
||||||
|
if: steps.filter.outputs.addedOrModified == 'true'
|
||||||
uses: azure/setup-helm@v1
|
uses: azure/setup-helm@v1
|
||||||
with:
|
with:
|
||||||
version: v3.5.3
|
version: v3.5.3
|
||||||
|
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
|
if: steps.filter.outputs.addedOrModified == 'true'
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
|
|
||||||
- name: Install helm-docs
|
- name: Install helm-docs
|
||||||
|
if: steps.filter.outputs.addedOrModified == 'true'
|
||||||
run: |
|
run: |
|
||||||
wget -O /tmp/helm-docs.deb https://github.com/norwoodj/helm-docs/releases/download/v1.5.0/helm-docs_1.5.0_linux_amd64.deb
|
wget -O /tmp/helm-docs.deb https://github.com/norwoodj/helm-docs/releases/download/v1.5.0/helm-docs_1.5.0_linux_amd64.deb
|
||||||
sudo dpkg -i /tmp/helm-docs.deb
|
sudo dpkg -i /tmp/helm-docs.deb
|
||||||
|
|
||||||
- name: Run against specified charts
|
- name: Run against changed charts
|
||||||
|
if: steps.filter.outputs.addedOrModified == 'true'
|
||||||
run: |
|
run: |
|
||||||
IFS=',' read -r -a CHARTS <<< "${{ github.event.client_payload.slash_command.charts }}"
|
CHARTS=()
|
||||||
|
PATHS=(${{ steps.filter.outputs.addedOrModified_files }})
|
||||||
|
# Get only the chart paths
|
||||||
|
for i in "${PATHS[@]}"
|
||||||
|
do
|
||||||
|
IFS='/' read -r -a path_parts <<< "$i"
|
||||||
|
CHARTS+=("${path_parts[1]}/${path_parts[2]}")
|
||||||
|
done
|
||||||
|
|
||||||
|
# Remove duplicates
|
||||||
|
CHARTS=( `for i in ${CHARTS[@]}; do echo $i; done | sort -u` )
|
||||||
|
|
||||||
for i in "${CHARTS[@]}"
|
for i in "${CHARTS[@]}"
|
||||||
do
|
do
|
||||||
echo "Rendering README for chart ${i}"
|
echo "Rendering README for chart ${i}"
|
||||||
@ -139,6 +161,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: Create commit
|
- name: Create commit
|
||||||
|
if: steps.filter.outputs.addedOrModified == 'true'
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
with:
|
with:
|
||||||
commit_message: Auto-generate chart README
|
commit_message: Auto-generate chart README
|
||||||
|
Loading…
Reference in New Issue
Block a user