Skip to content

CLOUDFLARE: Github Actions reports error when zone doesn't exist #4322

@StevenH1901

Description

@StevenH1901

Describe the bug
GitHub Actions throws an error when we're adding new domains to our repository. I'm happy to try to fix this, but wanted to make sure this isn't expected behavior before doing so.

To Reproduce
Steps to reproduce the behavior:

  1. Create a zone file that does not exist previously in your Cloudflare tenant.
  2. Run the stackexchange/dnscontrol image in a GitHub workflow with a step for dnscontrol preview (Or use the provided workflow below)
  3. Notice that it fails

DNS Provider

  • Cloudflare
name: DNS Preview

on:
  pull_request:
    branches:
      - main
    paths:
      - src/**
      - .github/workflows/dnsPreview.yml

jobs:
  dns-preview:
    runs-on: ["self-hosted", "rhel"]
    container:
      image: stackexchange/dnscontrol:latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Check version
        run: dnscontrol version

      - name: Preview changes
        run: dnscontrol preview
        working-directory: ${{ github.workspace }}/src
        env:
          CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
          CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions