From 69ff4417c8abf08788627aaae029611ef4df9ab2 Mon Sep 17 00:00:00 2001 From: Jonathan Sharpe Date: Mon, 16 Sep 2024 23:14:59 +0100 Subject: [PATCH] Update workflows --- .github/workflows/deps.yml | 17 ++++++----------- .github/workflows/push.yml | 34 ++++++++++------------------------ 2 files changed, 16 insertions(+), 35 deletions(-) diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml index 1a0d9e1d..bd614b26 100644 --- a/.github/workflows/deps.yml +++ b/.github/workflows/deps.yml @@ -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: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2b7e5a41..c8587670 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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: @@ -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: @@ -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"