Skip to content

deployment(backend): add env vars in CI workflow #1

deployment(backend): add env vars in CI workflow

deployment(backend): add env vars in CI workflow #1

Workflow file for this run

name: Backend CI
on:
push:
branches: ["main", "backend/workflows"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login Dockerhub
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_TOKEN
- name: Build Docker images for backend and graphql
env:
ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
DB_NAME: ${{ secrets.DB_NAME}}
DB_USER: ${{ secrets.DB_USER}}
DB_HOST: ${{ secrets.DB_HOST}}
DB_PORT: ${{ secrets.DB_PORT}}
DB_PASSWORD: ${{ secrets.DB_PASSWORD}}
PORT: ${{ secrets.PORT}}
KEY: ${{ secrets.KEY}}
SECTRET: ${{ secrets.SECTRET}}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY}}
run: |
docker compose build backend
docker compose build graphql
- name: Push Docker images to DockerHub
run: |
docker push omarsarfraz/project-listings:backend
docker push omarsarfraz/project-listings:graphql