Access environment variables in env?

Hey! You can use an action with the ::set-env special function :

- name: Env Setup
  run: |
    echo ::set-env name=CONTAINER_IMAGE::$CI_REGISTRY/(...)
    echo ::set-env name=CONTAINER_IMAGE_LATEST::$CI_REGISTRY/(...)
env:
    CI_REGISTRY: docker.pkg.github.com

Then these two env vars will be available in the subsequent steps.

1 Like