Skip to content

Commit

Permalink
chore: env-express 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
bbearcookie committed Jan 1, 2024
1 parent 63b16f4 commit d68b502
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 25 deletions.
41 changes: 41 additions & 0 deletions .github/actions/env-express/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Env Express
description: 'Express 앱에서 사용하는 환경 변수를 설정합니다.'
runs:
using: 'composite'
steps:
- name: Express 앱 .env 생성
run: |
echo "NODE_ENV=${{ secrets.NODE_ENV }}" >> .env
echo "PORT=${{ secrets.PORT }}" >> .env
echo "LOCAL_API_ENDPOINT=${{ secrets.LOCAL_API_ENDPOINT }}" >> .env
echo "DEPLOY_API_ENDPOINT=${{ secrets.DEPLOY_API_ENDPOINT }}" >> .env
echo "LOCAL_CLIENT_ENDPOINT=${{ secrets.LOCAL_CLIENT_ENDPOINT }}" >> .env
echo "DEPLOY_CLIENT_ENDPOINT=${{ secrets.DEPLOY_CLIENT_ENDPOINT }}" >> .env
echo "DEPLOY_CLIENT_ENDPOINT_LEGACY=${{ secrets.DEPLOY_CLIENT_ENDPOINT_LEGACY }}" >> .env
echo "LOCAL_REDIS_ENDPOINT=${{ secrets.LOCAL_REDIS_ENDPOINT }}" >> .env
echo "DEPLOY_REDIS_ENDPOINT=${{ secrets.DEPLOY_REDIS_ENDPOINT }}" >> .env
echo "DEPLOY_REDIS_PASSWORD=${{ secrets.DEPLOY_REDIS_PASSWORD }}" >> .env
echo "SNS_API_ENDPOINT=${{ secrets.SNS_API_ENDPOINT }}" >> .env
echo "SLACK_API_ENDPOINT=${{ secrets.SLACK_API_ENDPOINT }}" >> .env
echo "SLACK_HOOK_ENDPOINT=${{ secrets.SLACK_HOOK_ENDPOINT }}" >> .env
echo "SLACK_BOT_TOKEN=${{ secrets.SLACK_BOT_TOKEN }}" >> .env
echo "SLACK_SIGNING_SECRET=${{ secrets.SLACK_SIGNING_SECRET }}" >> .env
echo "DB_DATABASE=${{ secrets.DB_DATABASE }}" >> .env
echo "LOCAL_DB_USERNAME=${{ secrets.LOCAL_DB_USERNAME }}" >> .env
echo "LOCAL_DB_PASSWORD=${{ secrets.LOCAL_DB_PASSWORD }}" >> .env
echo "DEPLOY_DB_HOST=${{ secrets.DEPLOY_DB_HOST }}" >> .env
echo "DEPLOY_DB_USERNAME=${{ secrets.DEPLOY_DB_USERNAME }}" >> .env
echo "DEPLOY_DB_PASSWORD=${{ secrets.DEPLOY_DB_PASSWORD }}" >> .env
echo "JWT_SECRET_KEY=${{ secrets.JWT_SECRET_KEY }}" >> .env
echo "JWT_EXPIRES_IN=${{ secrets.JWT_EXPIRES_IN }}" >> .env
mv .env packages/slack/.env
cat packages/slack/.env
shell: bash
25 changes: 5 additions & 20 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
# name: Setup
# description: 'Setup Node'
# runs:
# using: 'node16'
# main: 'index.js'

name: Setup
description: 'Node.js와 Yarn 패키지를 설치합니다.'
runs:
using: 'composite'
steps:
- run: echo "Hi, I'm a calculator action!"
shell: bash

- name: Setup Node
- name: Node.js 설정
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
# name: Setup
# runs:
# - uses: actions/checkout@v3

# - name: Setup Node
# uses: actions/setup-node@v3
# with:
# node-version: 18.x
# cache: yarn

# - run: ls -al
- name: Yarn 패키지 설치
run: yarn
shell: bash
11 changes: 6 additions & 5 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ jobs:
node-version: 18.x
cache: yarn

- name: Setting .env
run: |
echo "${{ secrets.EXPRESS_ENV_FILE }}" >> .env
- uses: ./.github/actions/env-express
# - name: Setting .env
# run: |
# echo "${{ secrets.EXPRESS_ENV_FILE }}" >> .env

mv .env packages/slack/.env
cat packages/slack/.env
# mv .env packages/slack/.env
# cat packages/slack/.env

- run: yarn
- run: yarn slack test

0 comments on commit d68b502

Please sign in to comment.