Skip to content

enuelx/action-env-from-an-aws-ssm-list

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Release Tests CodeQL

Buy Me a Coffee at ko-fi.com

Invitame un café en cafecito.app

Create a dotenv from aws parameter store list 🚀

Create a dotenv from another dotenv file with a list of paths from aws parameter store

Parameters

Input Required? Default Description
inputFilename no .env.map Filename received as parameter with ssm paths
outputFilename no .env Filename received as parameter for output file

Example input file .env.map

VAR1=/qa/core/var1
VAR2=/qa/core/var2
VAR3=/qa/core/var3

Example output file .env

VAR1=value1
VAR2=value2
VAR3=value3

Example usage

name: Create dotenv file

on: [ push ]

jobs:
  create-dotenv-file:
    name: Create dotenv file
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v3

      # reference documentation: https://github.com/aws-actions/configure-aws-credentials
      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v2
        with:
          role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
          aws-region: us-east-2
      
      - uses: enuelx/env-from-an-aws-ssm-list@v1