mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-17 07:57:19 -05:00
Add GitHub Actions workflow tAdd sync-domains workflowo sync domains
Add GitHub Actions workflow to sync domain configuration on push to main or via manual trigger.
This commit is contained in:
34
.github/workflows/sync-domains.yml
vendored
Normal file
34
.github/workflows/sync-domains.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Sync Domains
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- ops/domains.yaml
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pyyaml requests
|
||||
|
||||
- name: Apply domain configuration
|
||||
env:
|
||||
GODADDY_API_KEY: ${{ secrets.GODADDY_API_KEY }}
|
||||
GODADDY_API_SECRET: ${{ secrets.GODADDY_API_SECRET }}
|
||||
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
|
||||
# Optionally set CLOUDFLARE_ACCOUNT_ID if needed by your script
|
||||
run: |
|
||||
python ops/scripts/apply_domains.py
|
||||
Reference in New Issue
Block a user