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 75e44d3 commit 8094f67
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 34 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
36 changes: 13 additions & 23 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,15 @@ 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
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 All @@ -49,18 +44,13 @@ 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
MONGO_INITDB_ROOT_PASSWORD: keepitsecret
MONGO_INITDB_ROOT_USERNAME: testdb
ports:
- 5432:5432
- 27017:27017
steps:
- uses: textbook/take-action@nodejs
with:
Expand All @@ -74,10 +64,10 @@ jobs:
tags: textbook/starter-kit:v2
- id: env-file
run: |
echo 'DATABASE_URL=postgres://testdb:keepitsecret@localhost:5432/testdb' >> "$ENV_FILE"
echo 'LOG_LEVEL=debug' >> "$ENV_FILE"
echo 'PORT=4321' >> "$ENV_FILE"
echo 'MONGO_URL=mongodb://testdb:keepitsecret@localhost:27017/testdb?authSource=admin' >> "$ENV_FILE"
echo 'NODE_ENV=docker' >> "$ENV_FILE"
echo 'PORT=4321' >> "$ENV_FILE"
echo "file=$ENV_FILE" >> "$GITHUB_OUTPUT"
env:
ENV_FILE: docker.env
Expand Down

0 comments on commit 8094f67

Please sign in to comment.