Update README.md #28
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: stage-build | |
on: | |
push: | |
branches: [ develop ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
environment: testing | |
services: | |
postgres: | |
image: postgres:10.8 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run unit tests | |
run: echo "Run unit tests" | |
build: | |
runs-on: ubuntu-latest | |
environment: staging | |
services: | |
postgres: | |
image: postgres:10.8 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
needs: test | |
strategy: | |
max-parallel: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Docker image | |
run: | | |
docker build \ | |
--build-arg SECRET_KEY=${{ secrets.SECRET_KEY }} \ | |
--build-arg DB_HOST=${{ secrets.DB_HOST }} \ | |
--build-arg DB_NAME=${{ secrets.DB_NAME }} \ | |
--build-arg DB_USER=${{ secrets.DB_USER }} \ | |
--build-arg DB_PASSWORD=${{ secrets.DB_PASSWORD }} \ | |
-t user_service:latest . |