Skip to content

fix: ingress domains #9

fix: ingress domains

fix: ingress domains #9

Workflow file for this run

name: test-and-deploy
on:
push:
branches: [ "master" ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_DB: challenge_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
lein deps &
npm ci
wait
- name: Build
run: |
lein uberjar &
npm run build
wait
- name: Run backend tests
run: lein test
env:
DB_TEST_HOST: localhost
DB_TEST_PASSWORD: postgres
- name: Run frontend tests
run: npm run test
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.backend
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/hs-challenge-backend:latest
- uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.frontend
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/hs-challenge-frontend:latest
build-args: |
BACKEND_URL=${{ secrets.BACKEND_URL }}