I just set CD on DO k8s with github actions.
When I deploy to DO k8s, I get authentication to DO k8s with my API token, which looks like
doctl auth init -t ${{ secrets.DO_TOKEN}}
Although it works like a charm. Everytime I make a deployment, I can see my API token generating in the API token page(cloud.digitalocean.com/account/api/tokens), which means If there would 10 deployments a day, I would got 20 tokens a day.
Is it fine? or am I doing something wrong?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Let me know if you’d like more detail, but I believe what I did was:
That way you don’t have to give GitHub actions your global DO credentials.
Hello @johnwook
I might be wrong here because I’m not too familiar with GitHub actions. I think you should be able to add the secret in GitHub GUI as environment variable securely then reuse it in all the deployments.
We have a blog post which might help you in setting it up:
https://www.digitalocean.com/blog/how-to-deploy-to-digitalocean-kubernetes-with-github-actions/
Cheers,
Dikshith