From cda0aec146e2b005659bc5b29ee688b2925ace5d Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Tue, 23 Feb 2021 18:44:46 +0100 Subject: [PATCH] some tweaking --- .github/workflows/wiki-create-docs.yaml | 33 +++++++++++-------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/.github/workflows/wiki-create-docs.yaml b/.github/workflows/wiki-create-docs.yaml index ae7b634bbb2..7cf14277f22 100644 --- a/.github/workflows/wiki-create-docs.yaml +++ b/.github/workflows/wiki-create-docs.yaml @@ -4,7 +4,6 @@ on: push: branches: - master - - charts tags-ignore: - '**' @@ -12,17 +11,12 @@ jobs: publish-app-docs: runs-on: ubuntu-latest steps: - - name: Checkout-Charts + - name: Checkout-Master uses: actions/checkout@v2 with: - ref: 'master' path: 'master' - - name: Checkout-Charts - uses: actions/checkout@v2 - with: - ref: 'charts' - path: 'charts' - - name: Checkout-Charts + token: ${{ secrets.RENOVPUSH }} + - name: Checkout-Wiki uses: actions/checkout@v2 with: repository: 'truecharts/wiki' @@ -64,16 +58,19 @@ jobs: - name: Create apps wiki run: | - cd charts + cd master for chart in charts/*; do - if [ -d "${chart}" ]; then - chartname=$(basename ${chart}) - mkdir -p ../wiki/content/apps/${chartname} || echo "wiki path already exists, continuing..." - if [ -d "${chart}/docs" ]; then - cp -f ${chart}/docs/* ../wiki/content/apps/${chartname}/ - fi - cp ${chart}/README.md ../wiki/content/apps/${chartname}/index.md || echo "readme copy failed, continuing..." - fi + if [ -d "${chart}" ]; then + maxfolderversion=$(ls -l ${chart} | grep ^d | awk '{print $9}' | tail -n 1) + chartname=$(basename ${chart}) + echo "Processing: ${chart} - folder: ${maxfolderversion}" + + mkdir -p ../wiki/content/apps/${chartname} || echo "wiki path already exists, continuing..." + if [ -d "${chart}/${maxfolderversion}/docs" ]; then + cp -f ${chart}/${maxfolderversion}/docs/* ../wiki/content/apps/${chartname}/ + fi + cp ${chart}/${maxfolderversion}/README.md ../wiki/content/apps/${chartname}/index.md || echo "readme copy failed, continuing..." + fi done ls ../wiki/content/apps/ cd ..