Skip to content

Extract Env Vars

THIS WORKFLOW IS CURRENTLY NON-FUNCTIONAL

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
environment string true The Github environment to retreive
the env and secret var
for.

Outputs

OUTPUT VALUE DESCRIPTION
all_vars "${{ jobs.get_env_vars.outputs.all_vars }}" All parsed variables and secrets.

Secrets

No secrets.

Example Usage

get-env-vars:
  uses: hotosm/gh-workflows/.github/workflows/env_vars.yml@1.6.0
  with:
    environment: ${{ github.ref_name }}

frontend-build:
  uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.6.0
  needs:
    - frontend-tests
    - get-env-vars
  with:
    context: src/frontend
    dockerfile: prod.dockerfile
    build_target: prod
    image_name: ghcr.io/${{ github.repository }}/frontend
    extra_build_args: |
      VITE_API_URL=${{ needs.get-env-vars.outputs.all_vars }}

Last update: July 27, 2024