Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration file outside the repo #28

Closed
dave-v opened this issue Jul 29, 2022 · 8 comments · Fixed by #37
Closed

Configuration file outside the repo #28

dave-v opened this issue Jul 29, 2022 · 8 comments · Fixed by #37

Comments

@dave-v
Copy link

dave-v commented Jul 29, 2022

We would like to use this action on many different repos with the same configuration, so it would be nice to define the configuration in a common location and reuse it.

An example is this action: https://github.com/release-drafter/release-drafter#configuration-options (look at the paragraph after the table of options that mentions Probot config).
In that case, we are able to put configuration files in a separate repo, and each repo using the action can get its config from there.

Perhaps a simple way could be to allow the configuration_path to accept a URL returning the configuration, or for private repos, providing the repo and filepath in that repo, an appropriate access token, and using the GitHub API to extract file contents.

If you would accept a PR, I might have a go.

@thehanimo
Copy link
Owner

That definitely seems like a nice feature to have! I like the configuration_path-being-a-URL approach which will essentially be a public URL. About private repos, would a parameter like is_private or even better, a key along with the URL help?

So this way, there will be 3 types of paths to config files:

  1. Relative to current repo
  2. Absolute public URLs
  3. Absolute private URLs (with a flag/key)

Also, PRs are always welcome :)

@dave-v
Copy link
Author

dave-v commented Jul 29, 2022

I will do some experimenting... but probably quite slowly 🙂.

@rjulius23
Copy link

rjulius23 commented Feb 6, 2023

Isnt it an option to make the GITHUB_REPOSITORY an input variable ? That way you can specify your template repository where your workflow templates are.

@Noamshmueli
Copy link

+1

@alexschwartz
Copy link

+1

I am trying to use this action as an organization wide required action. And it always look for the config file in the wrong location

@thehanimo
Copy link
Owner

I'll treat this as high priority. PRs welcome :)

@smzelek
Copy link
Contributor

smzelek commented May 5, 2023

@dave-v
@thehanimo
I unintentionally made a PR that partially addresses this issue:
#36

in this PR you can provide a local filepath to your configuration.
we needed shared configuration across all our repos, so we use this action with a prior step that downloads the configuration file.

@thehanimo
Copy link
Owner

@alexschwartz @dave-v @Noamshmueli @rjulius23 more ways to specify config file is now supported in v1.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants