deployment(backend): add basic CD workflow #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |
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 |