Skip to content

Commit

Permalink
Try to move env_variables into variable in yml
Browse files Browse the repository at this point in the history
check if it works?
  • Loading branch information
Byczax committed Feb 19, 2023
1 parent f6257f5 commit a5e911c
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
name: CI

variables:
ENV_VARIABLES: echo NEXTAUTH_URL=http://localhost:3000 >> .env
echo NEXTAUTH_SECRET=secret >> .env
echo GOOGLE_CLIENT_ID=123 >> .env
echo GOOGLE_CLIENT_SECRET=123 >> .env
echo DATABASE_URL="postgres://postgres:postgres@localhost:5432/postgres" >> .env
echo SMTP_HOST="smtp.gmail.com" >> .env
echo SMTP_USERNAME="example@gmail.com" >> .env
echo SMTP_PASSWORD="example_password" >> .env
echo EMAIL_FROM="example name" >> .env

on:
push:
branches: ["main"]
Expand All @@ -20,15 +31,7 @@ jobs:
- name: Setup env
run: |
touch .env
echo NEXTAUTH_URL=http://localhost:3000 >> .env
echo NEXTAUTH_SECRET=secret >> .env
echo GOOGLE_CLIENT_ID=123 >> .env
echo GOOGLE_CLIENT_SECRET=123 >> .env
echo DATABASE_URL="postgres://postgres:postgres@localhost:5432/postgres" >> .env
echo SMTP_HOST="smtp.gmail.com" >> .env
echo SMTP_USERNAME="example@gmail.com" >> .env
echo SMTP_PASSWORD="example_password" >> .env
echo EMAIL_FROM="example name" >> .env
$ENV_VARIABLES
- name: format
run: npm run format:check
- name: lint
Expand All @@ -44,11 +47,7 @@ jobs:
- name: Setup env
run: |
touch .env
echo NEXTAUTH_URL=http://localhost:3000 >> .env
echo NEXTAUTH_SECRET=secret >> .env
echo GOOGLE_CLIENT_ID=123 >> .env
echo GOOGLE_CLIENT_SECRET=123 >> .env
echo DATABASE_URL="postgres://postgres:postgres@localhost:5432/postgres" >> .env
$ENV_VARIABLES
- name: Install dependencies
uses: bahmutov/npm-install@v1
with:
Expand Down

0 comments on commit a5e911c

Please sign in to comment.