Skip to main content

GitHub Secrets and Variables

Configure these values in GitHub under Settings > Secrets and variables > Actions.

warning

Never commit secret values, service account keys, OAuth credentials, or runtime env files to either repository.

Backend repository

Repository: CATALOG-Historic-Records/orphaned-wells-ui-server

NameRequired forNotes
PROJECT_IDGKE deployment, tests, infrastructure automationGoogle Cloud project ID.
DOCKERHUB_USERNAMEGKE deploymentDocker Hub account used to push and pull backend images.
DOCKERHUB_ACCESS_TOKENGKE deploymentDocker Hub token used by CI and Kubernetes image pull secret creation.
CREDS_JSONBackend runtime files, older gcloud operationsGoogle authorized-user credentials JSON. Treat as highly sensitive.
SERVICE_KEY_JSONGKE deployment and backend runtime filesGoogle Cloud service account key JSON. The workflow uses it for GKE credentials and runtime file secrets.
K8S_DEPLOY_TARGETSGKE deploymentJSON from terraform output -json kubernetes_deploy_targets | jq -c .. Includes Kubernetes hosts, static IP names, resource settings, and upload bucket names. Update it after Terraform changes deployment targets.
<COLLABORATOR>_ENVGKE deploymentRuntime .env content for each dispatch-supported backend collaborator. The current dispatch workflow reads STAGING_ENV, CA_ENV, ISGS_ENV, NEWTS_ENV, OSAGE_ENV, and RRC_ENV.
REFRESH_TOKENIntegration testsGoogle OAuth refresh token used by automated tests when needed.

The runtime env secrets should contain backend runtime values such as database settings, storage settings, OAuth settings, and collaborator configuration. The GKE workflow overrides:

  • ENVIRONMENT
  • BACKEND_URL
  • LOG_DIR
  • LOCAL_STORAGE_ROOT
  • LOCAL_STORAGE_URL_BASE
  • STORAGE_BUCKET_NAME

Keep COLLABORATOR in the runtime secret if the backend uses collaborator-specific processors or configuration.

Backend repository variables

Use repository variables to control automatic GKE deploys:

NamePurpose
ENABLE_GKE_DEPLOYMENTSEnables automatic GKE deploys for all collaborator workflows that check this variable.
ENABLE_GKE_STAGING_DEPLOYEnables automatic staging GKE deploys.
ENABLE_GKE_CA_DEPLOYEnables automatic CA GKE deploys.
ENABLE_GKE_ISGS_DEPLOYEnables automatic ISGS GKE deploys.
ENABLE_GKE_NEWTS_DEPLOYEnables automatic NEWTS GKE deploys.
ENABLE_GKE_OSAGE_DEPLOYEnables automatic OSAGE GKE deploys.

When adding a new collaborator, add the matching secret and variable only after the workflow is configured to read it. The reusable GKE dispatch workflow must include the collaborator in its DEPLOY_ENV options, accepted secrets, and runtime-env case mapping.

Legacy backend VM secrets

These are only needed for the legacy VM deployment path:

NamePurpose
DEPLOY_TARGETSJSON map of VM names and zones consumed by older VM deployment workflows.
SSH_USERNAMESSH user for deployment commands against Compute Engine VMs.

Frontend repository

Repository: CATALOG-Historic-Records/orphaned-wells-ui

NameRequired forNotes
GCLOUD_SERVICE_ACCOUNT_JSONApp Engine deploymentGoogle Cloud service account key JSON used by frontend deployment workflows.
GOOGLE_CLIENTIDFrontend buildGoogle OAuth client ID written to REACT_APP_GOOGLE_CLIENTID.
DEV_BACKEND_URLDefault/staging frontend deploymentBackend URL used by the main frontend deploy workflow.
<COLLABORATOR>_BACKEND_URLCollaborator frontend deploymentsBackend URL for a collaborator frontend, such as CA_BACKEND_URL, ISGS_BACKEND_URL, NEWTS_BACKEND_URL, or OSAGE_BACKEND_URL.

Backend URL values must not include a trailing slash.

Updating secrets

For command-line secret updates, first authenticate the GitHub CLI with an account that can edit repository Actions secrets:

gh auth login
gh auth status --hostname github.com

After Terraform changes backend deployment targets, run this from orphaned-wells-ui-server/deployment/terraform:

terraform workspace select ogrre
gh secret set K8S_DEPLOY_TARGETS \
--repo CATALOG-Historic-Records/orphaned-wells-ui-server \
--body "$(terraform output -json kubernetes_deploy_targets | jq -c .)"

For manual updates in GitHub:

  1. Open the target repository on GitHub.
  2. Go to Settings > Secrets and variables > Actions.
  3. Select the secret or variable to create or update.
  4. Save the new value.
  5. Re-run the affected deployment workflow.