bbrkn/.forgejo/workflows/deploy.yaml
g00dvin ec0cfa2adf
Some checks failed
Deploy DNS Configuration / deploy (push) Failing after 34s
Add support to find all domains
2025-09-11 14:09:16 +03:00

46 lines
1.2 KiB
YAML

name: Deploy DNS Configuration
on:
push:
branches: [ main ]
paths: [ 'domains.txt' ]
jobs:
deploy:
runs-on: self-hosted # Используем self-hosted runner на шлюзе
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Validate domains file
run: |
if [ ! -f domains.txt ]; then
echo "Error: domains.txt not found"
exit 1
fi
# Проверка синтаксиса доменов
grep -v '^#' domains.txt | grep -v '^$' | while read domain; do
if ! echo "$domain" | grep -qE '^[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'; then
echo "Error: Invalid domain format: $domain"
exit 1
fi
done
- name: Prepare Makefile
run: |
chmod +x generate-configs.sh
chmod +x deploy-to-gateway.sh
- name: Run workflow (clean → check → all)
run: |
make clean
make check
make all
- name: Upload configs as artifacts
uses: actions/upload-artifact@v3
with:
name: dnsmasq-configs
path: |
/tmp/91-ipset-bbrkn.conf
/tmp/92-resolve-bbrkn.conf