Skip to content

resuable github actions

Notifications You must be signed in to change notification settings

Miensoap/extract-env-action

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

export-env-action

GitHub Secret에 여러 환경 변수를 단 하나의 파일로 등록해 사용할 수 있습니다.

사용 예시

  • Github Secret : ENV_FILE_CONTENT
DB_USERNAME=myuser
DB_PASSWORD=mypassword
API_KEY=myapikey
  • test.yml
jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - name: Set environment variables from secret
        uses: Miensoap/[email protected]
        with:
          env_file_content: ${{ secrets.ENV_FILE_CONTENT }}

      - name: Use environment variables
        run: |
          echo "DB_USERNAME is $DB_USERNAME"

테스트 결과

로그에 마스킹되어 표시되는 것 확인 image