This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Cloudflare DNS Records | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
updateDNS: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' # or the version you're using | |
- name: Install dependencies | |
run: npm install | |
- name: Run DNS Update Script | |
env: | |
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
CF_ZONE_ID: ${{ secrets.CF_ZONE_ID }} | |
run: node processDns.js |