Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
textbook committed Sep 16, 2024
1 parent df2887f commit 69ff441
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 35 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,15 @@ jobs:
permissions:
contents: write
services:
postgres:
image: postgres
mongodb:
image: mongo
env:
POSTGRES_PASSWORD: keepitsecret
POSTGRES_USER: testdb
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
MONGO_INITDB_ROOT_PASSWORD: keepitsecret
MONGO_INITDB_ROOT_USERNAME: testdb
ports:
- 5432:5432
- 27017:27017
env:
DATABASE_URL: postgres://testdb:keepitsecret@localhost:5432/testdb
MONGO_URL: mongodb://testdb:keepitsecret@localhost:27017/testdb?authSource=admin
steps:
- uses: textbook/take-action@nodejs
with:
Expand Down
34 changes: 10 additions & 24 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,13 @@ jobs:
node: [20.9, 20, 22]
runs-on: ubuntu-latest
services:
postgres:
image: postgres
mongodb:
image: mongo
env:
POSTGRES_PASSWORD: keepitsecret
POSTGRES_USER: testdb
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
MONGO_INITDB_ROOT_PASSWORD: keepitsecret
MONGO_INITDB_ROOT_USERNAME: testdb
env:
DATABASE_URL: postgres://testdb:keepitsecret@localhost:5432/testdb
MONGO_URL: mongodb://testdb:keepitsecret@localhost:27017/testdb?authSource=admin
steps:
- uses: textbook/take-action@nodejs
with:
Expand All @@ -49,18 +42,11 @@ jobs:
docker:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
mongodb:
image: mongo
env:
POSTGRES_PASSWORD: keepitsecret
POSTGRES_USER: testdb
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
MONGO_INITDB_ROOT_PASSWORD: keepitsecret
MONGO_INITDB_ROOT_USERNAME: testdb
steps:
- uses: textbook/take-action@nodejs
with:
Expand All @@ -74,7 +60,7 @@ jobs:
tags: textbook/starter-kit:v2
- id: env-file
run: |
echo 'DATABASE_URL=postgres://testdb:keepitsecret@localhost:5432/testdb' >> "$ENV_FILE"
echo 'DATABASE_URL=mongodb://testdb:keepitsecret@localhost:27017/testdb?authSource=admin' >> "$ENV_FILE"
echo 'LOG_LEVEL=debug' >> "$ENV_FILE"
echo 'PORT=4321' >> "$ENV_FILE"
echo 'NODE_ENV=docker' >> "$ENV_FILE"
Expand Down

0 comments on commit 69ff441

Please sign in to comment.