From 020e0ec97fd4d9e13ce1731d129fe4f0ff743f3a Mon Sep 17 00:00:00 2001 From: Jonathan Sharpe Date: Sun, 25 Aug 2024 11:00:17 +0100 Subject: [PATCH] Deps script now needs DB --- .github/workflows/deps.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml index 9d3347cf..0798588f 100644 --- a/.github/workflows/deps.yml +++ b/.github/workflows/deps.yml @@ -8,15 +8,29 @@ on: jobs: update: runs-on: ubuntu-latest + permissions: + contents: write + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: keepitsecret + POSTGRES_USER: testdb + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + env: + DATABASE_URL: postgres://testdb:keepitsecret@localhost:5432/testdb steps: - - uses: actions/checkout@v4 - with: - ssh-key: ${{ secrets.GH_DEPLOY_KEY }} - uses: textbook/take-action@nodejs with: - checkout: "false" node-version: 20 - run: | git config --global user.name "gh-actions" git config --global user.email "actions@github.com" + - run: npm run migration up - run: ./bin/up-to-date.sh