feat: add Docker stack backup script #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: validate | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| yaml-lint: | |
| name: YAML lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Lint YAML files | |
| uses: ibiqlik/action-yamllint@v3 | |
| with: | |
| file_or_dir: . | |
| config_data: | | |
| extends: relaxed | |
| ignore: | | |
| _archive/ | |
| Homepage.disabled/ | |
| rules: | |
| line-length: disable | |
| comments: disable | |
| indentation: | |
| indent-sequences: consistent | |
| truthy: | |
| check-keys: false | |
| compose-validate: | |
| name: Compose file syntax | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate Compose files | |
| run: | | |
| set -e | |
| shopt -s globstar nullglob | |
| fail=0 | |
| for f in **/docker-compose.yml; do | |
| case "$f" in | |
| _archive/*) echo "skip $f (archived)"; continue ;; | |
| Homepage.disabled/*) echo "skip $f (disabled)"; continue ;; | |
| esac | |
| echo "checking $f" | |
| if ! docker compose -f "$f" --env-file /dev/null config -q 2>/dev/null; then | |
| echo " WARN: $f has unresolved env vars or invalid structure" | |
| fail=1 | |
| fi | |
| done | |
| if [ "$fail" -ne 0 ]; then | |
| echo "" | |
| echo "One or more Compose files reported issues." | |
| echo "These can be env-var substitution warnings rather than real errors." | |
| echo "Inspect manually with: docker compose -f <path> config" | |
| fi | |
| markdown-link-check: | |
| name: Markdown link check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify markdown files parse | |
| run: | | |
| for f in *.md; do | |
| echo "found $f" | |
| test -s "$f" || { echo " ERROR: $f is empty"; exit 1; } | |
| done |