Hello!
I have actions working with doctl.
jobs:
deploy:
name: Development App Stack
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: install-doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DO_TOKEN }}
- name: get-app
run: doctl apps get <DO app id>
- name: update-app
run: doctl apps update <DO app id> --spec "<yaml file in github repo>" --access-token ${{ secrets.DO_TOKEN }}
Problem:
Error:
Error: PUT https://api.digitalocean.com/v2/apps/<DO app id>: 400 (request "aaaa...")
**GitHub user not authenticated**
I am fairly sure this is the REST API refusing even though I am passing the same token I used to get-app.
What is the REST API expecting?
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hi there,
As you are able to run the
doctl apps get <DO app id>
command but not the update command, I could suggest making sure that your DigitalOcean API token has both read and write access.If this is already the case, when using the same token, are you able to run the
doctl apps update <DO app id> --spec "<yaml-file>" --access-token ${{ secrets.DO_TOKEN }}
command locally and does it complete successfully when executed locally?The error that you are seeing could also be due to the lack of permissions to the GitHub repository itself, you need to make sure that the DigitalOcean App Platform has the necessary permissions to access your GitHub repository. This usually requires connecting your GitHub account to DigitalOcean and granting repository access. If you’ve made changes to the permissions or revoked access, you might encounter such errors.
Let me know how it goes!
Best,
Bobby
Never mind … figured it out. This was caused by not having digitalocean installed in my github account.