Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
iostpa authored Oct 11, 2024
1 parent 1427c4c commit 64645c9
Showing 1 changed file with 23 additions and 28 deletions.
51 changes: 23 additions & 28 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
name: Publish

on:
push:
branches: [main]
paths:
- "domains/**"
- ".github/workflows/publish.yml"
- "dnsconfig.js"
workflow_dispatch:
push:
branches: [main]
paths:
- "domains/**"
- ".github/workflows/publish.yml"
- "dnsconfig.js"

workflow_dispatch:

concurrency:
group: ${{ github.ref }}-publish
cancel-in-progress: false
group: ${{ github.ref }}-publish
cancel-in-progress: false

jobs:
dns:
name: DNS
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
dns:
name: DNS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Create Cloudflare credentials file
run: |
echo '{"cloudflare": {"TYPE": "CLOUDFLAREAPI", "accountid": "$CF_ACCOUNT_ID", "apitoken": "$CF_API_TOKEN"}}' > ./creds.json
- name: Install DNSControl
uses: gacts/install-dnscontrol@v1
with:
version: 3.31.4
- run: echo '{"cloudflare":{"TYPE":"CLOUDFLAREAPI","apitoken":"$CLOUDFLARE_API_TOKEN"}}' > ./creds.json

- name: Publish DNS Records
run: dnscontrol push
env:
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
- name: Publish
uses: is-cool-me/[email protected]
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
with:
args: push
config_file: "dnsconfig.js"

0 comments on commit 64645c9

Please sign in to comment.