portainer-stack-deploy
portainer-stack-deploy copied to clipboard
Authentication via API token instead of username/password
Starting with portainer v2.11+ a new authentication schema was introduced:
- API token (Header: X-API-Token)
Would it be desirable to have this option available in the github action?
Reference: https://docs.portainer.io/v/ce-2.11/api/access
Sounds good to me. I'm considering removing the username/password option completely. This will simplify the code a bit (we can remove some code). However, it will be a breaking change so we will probably need to release a new major version. Thoughts?
Sorry for the late response!
Sounds good to me.
Hopefully portainer will implement more granular control / scopes into the API Token mechanism at some point, so you don't need a new user account for a narrow permission scope. Anyway, that's out of scope for this repo/ action / issue.
API token support would be great. Trying with username and password on version 2.18.4 but getting this error: Logging in to Portainer instance... Error: AxiosError HTTP Status 404 (post /auth): 404 page not found
You can workaround the auth error by changing the host to include https://{hosturl}/#!/ but then hit other portainer function errors: Error: TypeError: allStacks.find is not a function
@bignellrp Here is my github action, hope that can help you.
https://github.com/marketplace/actions/portainer-deployment
@bignellrp Here is my github action, hope that can help you.
https://github.com/marketplace/actions/portainer-deployment
Thanks but this is giving a 404?
@bignellrp Here is my github action, hope that can help you. https://github.com/marketplace/actions/portainer-deployment
Thanks but this is giving a 404?
The action is renamed: https://github.com/marketplace/actions/deploy-to-portainer