diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c55c10c..58c5711 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,10 @@ jobs: run: just install - run: | uv run dnsm update examples/simple.toml + env: + TENCENTCLOUD_SECRET_ID: ${{ secrets.TENCENTCLOUD_SECRET_ID }} + TENCENTCLOUD_SECRET_KEY: ${{ secrets.TENCENTCLOUD_SECRET_KEY }} + LEXICON_CLOUDFLARE_AUTH_TOKEN: ${{ secrets.LEXICON_CLOUDFLARE_AUTH_TOKEN }} - name: Run tests and benchmarks ✅ uses: CodSpeedHQ/action@v3 env: diff --git a/dns_manager/setter/base.py b/dns_manager/setter/base.py index 66aad7b..3657623 100644 --- a/dns_manager/setter/base.py +++ b/dns_manager/setter/base.py @@ -106,15 +106,18 @@ def update_dns(self, remove_unmanaged: bool = False): records.append((subdomain, record.value)) logger.warning(f"([red]🔓 Unmanaged[/]) {record}") path = Path("~/.config/dns-manager/unmanaged.json") - save_config( - path, - Config( - domain=self.domain, - setter_name=self.setter_name, - records=records, - ).model_dump(), - ) - logger.info(f"Unmanaged records saved to [bold purple]{path}[/].") + try: + save_config( + path, + Config( + domain=self.domain, + setter_name=self.setter_name, + records=records, + ).model_dump(), + ) + logger.info(f"Unmanaged records saved to [bold purple]{path}[/].") + except Exception as e: + logger.warning(f"Failed to save unmanaged records: {e}") for subdomain, record in new_records.items(): cached_record = self.cached_records.get(subdomain, None) if cached_record is None: