diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 000000000..b46b4239e --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,91 @@ +name: Sync SUMMARY.md + +on: + push: + paths: + - "images/**" + - "SUMMARY.md" + branches: + - master + +jobs: + summary-syncer: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + + - name: Sync SUMMARY.md + run: | + container_list="" + + for image in images/docker-*; do + container=$(basename "$image" .md) + ignore_containers=( + base-alpine-example + base-ubuntu-example + doc-builder + gazee + gmail-order-bot + hydra2 + jenkins-builder + letsencrypt + musicbrainz + mylar + pydio + readme-sync + rutorrent + sickrage + tester + yq + ) + if [[ "$image" =~ "baseimage" ]]; then + continue + elif [[ ${ignore_containers[*]} =~ ${container#*-} ]]; then + continue + elif grep -q "| latest | ❌ | |" "$image"; then + continue + elif grep -q "# DEPRECATION NOTICE" "$image"; then + continue + elif grep -q "THIS IMAGE IS DEPRECATED." "$image"; then + continue + else + container_list+="* [linuxserver/${container#*-}](images/docker-${container#*-}.md)"$'\n' + fi + done + + cat <<-EOF >SUMMARY.md + + + # Table of contents + + * [Introduction](README.md) + * [FAQ](FAQ.md) + + ## General + + * [Container Execution](general/container-execution.md) + * [Docker Containers: 101](general/containers-101.md) + * [Running LinuxServer Containers](general/running-our-containers.md) + * [Customizing LinuxServer Containers](general/container-customization.md) + * [Docker Compose](general/docker-compose.md) + * [Understanding PUID and PGID](general/understanding-puid-and-pgid.md) + * [Updating our containers](general/updating-our-containers.md) + * [Volumes](general/volumes.md) + * [Fleet](general/fleet.md) + * [SWAG setup](general/swag.md) + * [Awesome LSIO](general/awesome-lsio.md) + + ## Images + + ${container_list} + ## Misc + + * [Finances](finances.md) + EOF + + git config --global user.email "ci@linuxserver.io" + git config --global user.name "LinuxServer-CI" + git commit -am "Automated syncing of SUMMARY" || : + git push || :