....
This commit is contained in:
@@ -77,31 +77,31 @@ jobs:
|
|||||||
name: 'flarectl'
|
name: 'flarectl'
|
||||||
version: '0.113.0'
|
version: '0.113.0'
|
||||||
|
|
||||||
- name: Subdomain/CNAME Comparison & Creation
|
- name: Grab Subdomains from Docker Compose & Cloudflare
|
||||||
id: grab-subdomains
|
id: grab-subdomains
|
||||||
env:
|
env:
|
||||||
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
||||||
CF_API_EMAIL: ${{ secrets.CF_API_EMAIL }}
|
CF_API_EMAIL: ${{ secrets.CF_API_EMAIL }}
|
||||||
run: |
|
run: |
|
||||||
flarectl dns list --zone "trez.wtf" --type=CNAME --content "trez.wtf"
|
|
||||||
echo "Grabbing subdomains from Cloudflare..."
|
|
||||||
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
|
|
||||||
echo "Grabbing subdomains from docker-compose.yml..."
|
echo "Grabbing subdomains from docker-compose.yml..."
|
||||||
yq '.services[].labels.swag_url' docker-compose.yml | egrep -v 'null' | sed -e 's|"||g' | awk -F'.' '{print $1}' | sort > compose_subdomains.txt
|
yq '.services[].labels.swag_url' docker-compose.yml | egrep -v 'null' | sed -e 's|"||g' | awk -F'.' '{print $1}' | sort > compose_subdomains.txt
|
||||||
|
echo "Grabbing subdomains from Cloudflare..."
|
||||||
|
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
|
||||||
|
|
||||||
- name: Compare Subdomains and Create Missing Ones
|
- name: Compare Subdomains and Create Missing Ones
|
||||||
id: compare-subdomains
|
id: compare-subdomains
|
||||||
uses: LouisBrunner/diff-action@v2.2.0
|
uses: LouisBrunner/diff-action@v2.2.0
|
||||||
with:
|
with:
|
||||||
old: compose_subdomains.txt
|
old: compose_subdomains.txt
|
||||||
new: cloudflare_subdomains.txt
|
new: cloudflare_subdomains.txt
|
||||||
mode: 'addition'
|
mode: addition
|
||||||
tolerance: mixed-better
|
tolerance: mixed-better
|
||||||
|
output: domain_compare.txt
|
||||||
|
|
||||||
- name: Create Missing Subdomains
|
# - name: Create Missing Subdomains
|
||||||
if: steps.compare-subdomains.outputs.output != ''
|
# if: steps.compare-subdomains.outputs.output != ''
|
||||||
run: |
|
# run: |
|
||||||
echo ${{ steps.compare-subdomains.outputs.output }}
|
# cat ${{ steps.compare-subdomains.outputs.output }}
|
||||||
|
|
||||||
# merge-pr:
|
# merge-pr:
|
||||||
# name: PR Merge
|
# name: PR Merge
|
||||||
|
|||||||
Reference in New Issue
Block a user