From 587160811f53785dd86867158636952d58708a41 Mon Sep 17 00:00:00 2001 From: ramvignesh-b Date: Thu, 16 Apr 2026 04:36:40 +0530 Subject: [PATCH] feat: centralize SSL certificate generation into a reusable workflow job --- .github/workflows/ci.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf7ff3f..5e105f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,23 @@ on: branches: [ main ] jobs: + certs: + name: Certificates + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup SSL using mkcert + run: | + sudo apt-get update + sudo apt-get install -y mkcert libnss3-tools + mkdir -p certs + mkcert -install + mkcert localhost [IP_ADDRESS] ::1 -cert-file certs/localhost.pem -key-file certs/localhost-key.pem + frontend: name: Frontend CI runs-on: ubuntu-latest + needs: certs defaults: run: working-directory: ./frontend @@ -32,6 +46,7 @@ jobs: backend: name: Backend CI runs-on: ubuntu-latest + needs: certs defaults: run: working-directory: ./backend @@ -65,6 +80,7 @@ jobs: e2e: name: E2E Tests runs-on: ubuntu-latest + needs: certs services: postgres: image: postgres:16-alpine @@ -83,14 +99,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup SSL using mkcert - run: | - sudo apt-get update - sudo apt-get install -y mkcert libnss3-tools - mkdir -p certs - mkcert -install - mkcert localhost [IP_ADDRESS] ::1 -cert-file certs/localhost.pem -key-file certs/localhost-key.pem - - name: Install uv uses: astral-sh/setup-uv@v5 with: