Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

env2yaml

Docker container for conversion of env files to YAML files to be used with Google Cloud Run gcloud CLI. It is in particular design to be used with GitHub Actions et Google Cloud Build to deploy applications to Google Cloud Run.

This container is loosely based after this shell script by l2D.

The container is available on Docker Hub under the name joanfabregat/env2yaml.

Usage

As a standalone script:

curl -L -o env2yaml.sh https://raw.githubusercontent.com/joanfabregat/env2yaml/main/env2yaml.cjs 
node env2yaml.sh .env env.yaml

In a cloudbuild.yaml configuration file:

steps:
  # Build the container image
  - id: 'docker-build'
    name: 'gcr.io/cloud-builders/docker'
    args:
      - 'build'
      - '.'

  # Generation of the env.yaml file
  - id: 'env2yaml'
    name: 'joanfabregat/env2yaml'
    env:
      - 'INPUT_FILE=/workspace/.env'
      - 'OUTPUT_FILE=/workspace/.env.yaml'

  # Deploy container image to Cloud Run
  - id: 'deploy-to-cloudrun-staging'
    name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
    args:
      - 'run'
      - 'deploy'
      - '--env-vars-file=/workspace/.env.yaml'

About

Docker container for conversion of env files to YAML files to be used with Google Cloud Run gcloud CLI

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages