Debugging CF subdomain step.

This commit is contained in:
2025-01-01 12:02:52 -05:00
parent f14ac8bf6e
commit 1b6cd1c56b
+21 -21
View File
@@ -75,28 +75,28 @@ jobs:
CF_API_KEY: ${{ secrets.CF_API_TOKEN }} CF_API_KEY: ${{ secrets.CF_API_TOKEN }}
CF_API_EMAIL: ${{ secrets.CF_API_EMAIL }} CF_API_EMAIL: ${{ secrets.CF_API_EMAIL }}
run: | run: |
flarectl --json dns list --zone "trez.wtf" --type CNAME --content "trez.wtf" | jq '.[].Name' | sed -e 's|"||g' | awk -F"." '{print $1}' | sort > cloudflare_subdomains.txt flarectl --json dns list --zone "trez.wtf" --type CNAME --content "trez.wtf"
- name: Compare Subdomains # - name: Compare Subdomains
id: compare-subdomains # id: compare-subdomains
env: # env:
DOCKER_HOST: tcp://dockerproxy:2375 # DOCKER_HOST: tcp://dockerproxy:2375
CF_API_KEY: ${{ secrets.CF_API_TOKEN }} # CF_API_KEY: ${{ secrets.CF_API_TOKEN }}
CF_API_EMAIL: ${{ secrets.CF_API_EMAIL }} # CF_API_EMAIL: ${{ secrets.CF_API_EMAIL }}
run: | # run: |
diff compose_subdomains.txt cloudflare_subdomains.txt | awk '{print $2}' | sed -e 's|.||g' > missing_subdomains.txt # diff compose_subdomains.txt cloudflare_subdomains.txt | awk '{print $2}' | sed -e 's|.||g' > missing_subdomains.txt
if [ -s missing_subdomains.txt ]; then # if [ -s missing_subdomains.txt ]; then
echo "Missing subdomains found. Please add them to Cloudflare." # echo "Missing subdomains found. Please add them to Cloudflare."
echo "Missing subdomains:" # echo "Missing subdomains:"
cat missing_subdomains.txt # cat missing_subdomains.txt
exit 1 # exit 1
else # else
echo "No missing subdomains found." # echo "No missing subdomains found."
fi # fi
for subdomain in $(cat missing_subdomains.txt); do # for subdomain in $(cat missing_subdomains.txt); do
echo "Adding ${subdomain} to Cloudflare..." # echo "Adding ${subdomain} to Cloudflare..."
flarectl dns creeate --zone ${{ secrets.CF_ZONE_ID }} --type CNAME --name "${subdomain}" --content "trez.wtf" --proxy true # flarectl dns creeate --zone ${{ secrets.CF_ZONE_ID }} --type CNAME --name "${subdomain}" --content "trez.wtf" --proxy true
done # done
# docker-compose-test: # docker-compose-test:
# name: Docker Compose Test # name: Docker Compose Test