{"id":20428905,"url":"https://github.com/ppmathis/dnscontrol-library","last_synced_at":"2025-03-05T05:25:31.334Z","repository":{"id":219636101,"uuid":"749500960","full_name":"ppmathis/dnscontrol-library","owner":"ppmathis","description":"Publicly available helper functions for DNSControl","archived":false,"fork":false,"pushed_at":"2024-05-01T15:16:22.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-15T16:27:14.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ppmathis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-28T18:58:18.000Z","updated_at":"2024-05-01T15:16:25.000Z","dependencies_parsed_at":"2024-01-28T21:22:51.854Z","dependency_job_id":"6649150d-a1fe-4c68-8fb4-f02e561e2188","html_url":"https://github.com/ppmathis/dnscontrol-library","commit_stats":null,"previous_names":["ppmathis/dnscontrol-library"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmathis%2Fdnscontrol-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmathis%2Fdnscontrol-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmathis%2Fdnscontrol-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmathis%2Fdnscontrol-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppmathis","download_url":"https://codeload.github.com/ppmathis/dnscontrol-library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241970602,"owners_count":20050688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T07:29:24.474Z","updated_at":"2025-03-05T05:25:31.306Z","avatar_url":"https://github.com/ppmathis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DNSControl Library\n\nAn inofficial repository maintaining public helper functions and templates for usage with the great [DNSControl](https://docs.dnscontrol.org/) tool. DNSControl allows you to fully manage your DNS records in a version controlled way with a flexible and powerful JavaScript based configuration language. To prevent repetion across similar DNS zones, helper functions can be created for common tasks and shared across multiple zones.\n\nThis repository provides various of these helper functions, always prefixed with `DCL_` to avoid name collisions. You can either individual snippets from the `lib` folder or include the `index.js` in the top-level of this repository to include all functions at once. All the respective functions along with JSDoc documentation can be found in the `lib` folder.\n\n## Usage\nThe easiest way to get this library into your own DNSControl repository is to use Git submodules. In your DNSControl repository, run the following command to add this repository as a submodule:\n\n```bash\ngit submodule add -b main https://github.com/ppmathis/dnscontrol-library.git dcl\n```\n\nThis will add the repository as a submodule in the `dcl` folder. You can then include the library in your DNSControl configuration by adding the following line to the top of your `config.js`:\n\n```javascript\nrequire('./dcl/index.js')\n```\n\nTo update the library to the latest version, run the following command:\n\n```bash\ngit submodule update --remote\n```\n\nIf you are looking to integrate this with your CI/CD pipeline, make sure to also fetch Git submodules accordingly. When using GitHub actions, the following workflow template can be used:\n\n```yaml\nname: CI\non: push\n\njobs:\n  dnscontrol:\n    runs-on: ubuntu-latest\n    container:\n      image: docker.io/stackexchange/dnscontrol:4.8.2\n    steps:\n      - name: Install Git for checkout\n        run: |\n          apk add --no-cache git\n\n      - uses: actions/checkout@v4\n        with:\n          submodules: true\n\n      - name: Verify DNS configuration\n        run: |\n          dnscontrol version\n          dnscontrol check\n\n      - name: Push DNS configuration\n        run: |\n          dnscontrol push\n        env:\n          CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}\n          CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}\n        if: github.ref == 'refs/heads/main'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppmathis%2Fdnscontrol-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppmathis%2Fdnscontrol-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppmathis%2Fdnscontrol-library/lists"}