Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the workflow for Cleanup and DNS Record Management #50

Open
exil0867 opened this issue Apr 5, 2023 · 0 comments
Open

Improve the workflow for Cleanup and DNS Record Management #50

exil0867 opened this issue Apr 5, 2023 · 0 comments

Comments

@exil0867
Copy link
Contributor

exil0867 commented Apr 5, 2023

Hello!

I have been examining the GitHub Actions workflow for creating CNAME records in the cli.rs project and noticed a few areas that could benefit from improvements, specifically regarding cleanup, scalability, and the ability to update existing CNAME records. I would like to contribute to the project by addressing these issues.

Example:

Currently, users cannot update their subdomain CNAME value due to the workflow's limitations. For instance, if a user wants to change the CNAME value for their subdomain (e.g., from old-value.github.io to new-value.github.io), the workflow will attempt to create a new DNS record with the updated value. However, DigitalOcean rejects the addition of a DNS record that already exists, resulting in a silent error in the logs, and the CNAME value remains unchanged.

To resolve this issue, I propose the following improvements:

  1. Cleanup: Implement a mechanism within the workflow that checks for deleted or modified files in the domains directory and performs the necessary cleanup actions on DigitalOcean. This will ensure that the DNS records stay up-to-date with the repository state.

  2. Enhance the workflow to support updating existing CNAME values, deleting records, and creating new ones by detecting changes and using the appropriate DigitalOcean CLI commands to update the DNS records accordingly. Currently, the workflow does not handle the removal or modification of existing DNS records. If a subdomain needs to be removed or updated, it would need to be done manually.

The improvements I am planning to implement would make use of the following DigitalOcean CLI commands:

  • doctl compute domain records create: Create a DNS record
  • doctl compute domain records delete: Delete a DNS record
  • doctl compute domain records list: List the DNS records for a domain
  • doctl compute domain records update: Update a DNS record

I believe these improvements will help ensure that the cli.rs project continues to serve the Rust community effectively as it grows. I would appreciate any feedback or suggestions you might have, and I am ready to submit a pull request with the proposed changes once we agree on the best approach.

Please note that I will be testing the changes carefully in my fork before opening pull requests to ensure the updated workflow functions as expected.

I am looking forward to contributing to this project and helping to enhance it. Please let me know if my PRs will be welcomed 😁.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant