bobheadxi / deployments

🔖 GitHub Action for working painlessly with deployment statuses
https://github.com/marketplace/actions/github-deployments
MIT License
385 stars 64 forks source link

New Delete Env Outside Deployments Check #135

Open brolewis opened 1 year ago

brolewis commented 1 year ago

It looks like the new call to deleteAnEnvironment is outside the check for deployments. Seeing errors when trying to run delete-env in a workflow where that specific run didn't have an environment.

https://github.com/bobheadxi/deployments/blob/main/src/lib/delete.ts#L39-L43

schorfES commented 1 year ago

Same here, receiving the following error when deleting an environment:

unexpected error encountered: HttpError: Resource not accessible by integration
Error: unexpected error encountered: HttpError: Resource not accessible by integration - see logs for more information

I assume this problem is related to the described issue by @brolewis.

brolewis commented 1 year ago

@schorfES Maybe, but I just realized that for our workflows I thought we were using a PAT token, but we in fact were not, so that can cause problems according to the docs for this action as well, so in my case, it might be a user error.

schorfES commented 1 year ago

@schorfES Maybe, but I just realized that for our workflows I thought we were using a PAT token, but we in fact were not, so that can cause problems according to the docs for this action as well, so in my case, it might be a user error.

@brolewis thank you for that hint. I will investigate in that direction. I was wondering because it worked as expected for the last ~5 month and is failing since yesterday morning. Yes, probably a token is expired but we currently do not pass them explicitly to the job (following the docs).

bobheadxi commented 1 year ago

cc @buckett could you take a look at this?

gugaiz commented 1 year ago

I am explicitly passing the PAT token and the env. It has been failing for the last 2 weeks with the same error posted here

dstockhammer commented 1 year ago

Is there a workaround for this?