docker-documentation/.github/workflows/sync.yml

95 wiersze
2.9 KiB
YAML

name: Sync SUMMARY.md
on:
push:
paths:
- "images/**"
- "SUMMARY.md"
branches:
- master
jobs:
summary-syncer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.0
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
build-agent
ci
doc-builder
gazee
gmail-order-bot
hydra2
jenkins-builder
letsencrypt
musicbrainz
mylar
pydio
readme-sync
rutorrent
sickrage
tester
unrar
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
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please edit https://github.com/linuxserver/docker-documentation/tree/master/.github/workflow/sync.yml -->
# 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 || :