Initial commit: Cloudflare DNS management with Pulumi

This commit is contained in:
Adam Jones 2026-01-06 12:14:47 +00:00 • committed by Adam Jones
commit d8d2f39c99
No known key found for this signature in database
2 changed files with 3748 additions and 0 deletions

39
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,39 @@
name: CI
on:
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
build:
name: Build and Typecheck
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Setup Pulumi
uses: pulumi/actions@v6
with:
pulumi-version: '3.214.1'
- name: Install Pulumi packages
run: pulumi install
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Check formatting
run: npm run format:check

56
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,56 @@
name: Deploy
on:
push:
branches:
- main
permissions:
contents: read
env:
PULUMI_VERSION: "^3"
jobs:
deploy-production:
name: Deploy to Production
runs-on: ubuntu-latest
environment: production
concurrency:
group: deploy-production
cancel-in-progress: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Setup Pulumi
uses: pulumi/actions@v6
with:
pulumi-version: ${{ env.PULUMI_VERSION }}
- name: Install Pulumi packages
run: pulumi install
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_PROD_SERVICE_ACCOUNT_KEY }}
- name: Deploy to Production
env:
PULUMI_PASSPHRASE: ${{ secrets.PULUMI_PROD_PASSPHRASE }}
run: |
echo "$PULUMI_PASSPHRASE" > passphrase.prod.txt
make up