daisaru11 / tfupdate-github-actions

tfupdate Github Actions
MIT License
9 stars 4 forks source link

Configurable provider repos #2

Open MPV opened 4 years ago

MPV commented 4 years ago

The implementation currently assumes all providers have repos named like this:

https://github.com/daisaru11/tfupdate-github-actions/blob/e78ae0e7dfaa0ab36f4d4df7a102c4334017704f/entrypoint.sh#L38

Here's an example where this doesn't work:

$ tfupdate release latest terraform-providers/terraform-provider-sops
failed to get the latest release for terraform-providers/terraform-provider-sops: GET https://api.github.com/repos/terraform-providers/terraform-provider-sops/releases/latest: 404 Not Found []

...compared to this that works:

$ tfupdate release latest carlpett/terraform-provider-sops
0.5.2

It would be nice if it was possible to configure the full provider repo name, and not just the last part:

https://github.com/daisaru11/tfupdate-github-actions/blob/e78ae0e7dfaa0ab36f4d4df7a102c4334017704f/action.yml#L15-L17

MPV commented 4 years ago

Semi-related: I've also raised https://github.com/minamijoyo/tfupdate/issues/28 about not being able to get "latest" on all types of providers (for example terraform-provider-github), which this action currently assumes would work (since we're talking about changes to the same line here). Let me know if you'd like to discuss that separately in another issue.

MPV commented 4 years ago

There's also a new option in tfupdate to consider:

--source-type tfregistryProvider

...as per https://github.com/minamijoyo/tfupdate/issues/28#issuecomment-704290019

MPV commented 3 years ago

Here's another example of this not working:

$ tfupdate release latest terraform-providers/terraform-provider-openstack
failed to get the latest release for terraform-providers/terraform-provider-openstack: GET https://api.github.com/repositories/294770956/releases/latest: 404 Not Found []

vs

$ tfupdate release latest terraform-provider-openstack/terraform-provider-openstack
1.35.0
MPV commented 3 years ago

I took another look at tfupdate, but it seems using non-default GitHub owner (i.e. anything else than terraform-providers/xyz) isn't supported yet for the tfupdate provider anyway: https://github.com/minamijoyo/tfupdate/issues/28#issuecomment-768184481