File tree Expand file tree Collapse file tree 5 files changed +22
-3
lines changed
Expand file tree Collapse file tree 5 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1+ /scripts /gh-md-toc
2+ test_readme.md
Original file line number Diff line number Diff line change 8888 shell : bash
8989 run : " python -m pip install jinja2 pyyaml"
9090
91+ - name : " Install github-markdown-toc"
92+ shell : bash
93+ run : |
94+ curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o ${{ github.action_path }}/scripts/gh-md-toc
95+ chmod a+x ${{ github.action_path }}/scripts/gh-md-toc
96+
9197 - name : " Update README.md"
9298 shell : bash
9399 run : " bash ${{ github.action_path }}/scripts/update_readme.sh \" ${{ inputs.readme_path }}\" "
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ set -e
4+
35if [[ $SKIP_README == " true" ]]; then
46 echo " Generation of README.md is disabled."
57 exit 0
1921fi
2022
2123python $SCRIPT_DIR /../readme_builder.py > $1
24+
25+ # If TOC tag is in the readme generate and add the TOC.
26+ if grep -q " <\!\-\-ts\-\->" " $1 " ; then
27+ $SCRIPT_DIR /gh-md-toc --insert --no-backup --hide-footer $1
28+ fi
Original file line number Diff line number Diff line change 11{% set short_repository = repository.split("/")[ 1] -%}
22# {{ short_repository }}
33
4-
54{{ description }}
65
6+ <!-- ts-->
7+ <!-- te-->
8+
79## Benefits
810
911### Multi Architecture Builds
@@ -38,6 +40,8 @@ Containers are rebuilt weekly in order to take on the security patches from upst
3840
3941{{ quick_start }}
4042
43+ {{ documentation }}
44+
4145## Python Versions
4246
4347This project actively supports these Python versions:
@@ -81,4 +85,3 @@ Every tag in this repository supports these architectures:
8185
8286{{ tags }}
8387
84- {{ documentation }}
Original file line number Diff line number Diff line change @@ -7,5 +7,6 @@ export PACKAGE_VERSIONS="0.13.3 0.13.4 0.14.0 0.15.0"
77export PYTHON_VERSIONS=" 3.6 3.7 3.8 3.9 3.10"
88export ORGANIZATION=" TestOrganization"
99export REPOSITORY=" TestOrganization/TestRepository"
10+ export REPOSITORY_SHORT=" TestRepository"
1011
11- ./scripts/update_readme.sh -
12+ ./scripts/update_readme.sh ./test_readme.md
You can’t perform that action at this time.
0 commit comments