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

Replace Github actions secrets with variables for non-sensitive data #193

Open
fjuniorr opened this issue Jan 27, 2023 · 1 comment · May be fixed by #212
Open

Replace Github actions secrets with variables for non-sensitive data #193

fjuniorr opened this issue Jan 27, 2023 · 1 comment · May be fixed by #212

Comments

@fjuniorr
Copy link
Contributor

The following variables are defined as secrets in Github Actions making it inconvenient to troubleshoot CI issues that could be related to their values:

  • CKANR_DEFAULT_URL
  • CKANR_TEST_BEHAVIOUR
  • CKANR_TEST_DID
  • CKANR_TEST_GID
  • CKANR_TEST_OID
  • CKANR_TEST_RID
  • CKANR_TEST_URL
@florianm
Copy link
Contributor

I'm just bumping into this in #211 - would it make sense to set all non-sensitive test variables as defaults in ckanr_settings?

This way, any keen contributor could still override them to configure local tests, but the defaults could be made to work with the GH actions run. Bonus points for a contributing guide with steps to spin up a local CKAN via docker-compose.

ckanr_settings <- function() {
  ops <- list(url = Sys.getenv("CKANR_DEFAULT_URL", ""),
              key = Sys.getenv("CKANR_DEFAULT_KEY", ""),
              test_url = Sys.getenv("CKANR_TEST_URL", "http://localhost:5000/"),
              test_key = Sys.getenv("CKANR_TEST_KEY", ""),
              test_did = Sys.getenv("CKANR_TEST_DID", "EXAMPLE_VALUE"),
              test_rid = Sys.getenv("CKANR_TEST_RID", "EXAMPLE_VALUE"),
              test_gid = Sys.getenv("CKANR_TEST_GID", "EXAMPLE_VALUE"),
              test_oid = Sys.getenv("CKANR_TEST_OID", "EXAMPLE_VALUE"),
              test_behaviour = Sys.getenv("CKANR_TEST_BEHAVIOUR", "FAIL"),
              proxy = get("ckanr_proxy", ckanr_settings_env)
  )
  structure(ops, class = "ckanr_settings")
}

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.

2 participants