Skip to content

Merge pull request #67 from brendantwh/voice #26

Merge pull request #67 from brendantwh/voice

Merge pull request #67 from brendantwh/voice #26

Workflow file for this run

name: CI Pipeline
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: '6.0'
- name: Install dependencies
working-directory: backend/question-service
run: npm ci
- name: Run Tests
working-directory: backend/question-service
run: npm run test-ci
- name: Google Cloud Authentication
uses: "google-github-actions/auth@v1"
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: tokyo-crossbar-440806-u9
service_account_key: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
export_defauly_credentials: true
- name: Configure Docker for Google Artifact Registry
run: |
gcloud auth configure-docker asia-southeast1-docker.pkg.dev
- name: Build and push Docker images
run: |
docker compose build
services=("frontend" "matching-service" "question" "signaling-service" "user")
for service in "${services[@]}"; do
image="asia-southeast1-docker.pkg.dev/tokyo-crossbar-440806-u9/peerprep/$service:latest"
docker tag "cs3219-ay2425s1-project-g44-$service" "$image"
docker push "$image"
done