Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

test: Adds test suite for first endpoints (#19) #6

test: Adds test suite for first endpoints (#19)

test: Adds test suite for first endpoints (#19) #6

Workflow file for this run

name: push
on:
push:
branches: main
jobs:
dockerhub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9
architecture: x64
- uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.6.1"
- name: Resolve dependencies
run: poetry export -f requirements.txt --without-hashes --output requirements.txt
- name: Build docker
run: docker build . -t quackai/contribution-api:latest
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: quackai
password: ${{ secrets.DOCKERHUB_PW }}
- name: Push to hub
run: docker push quackai/contribution-api:latest
deploy-dev:
needs: dockerhub
runs-on: ubuntu-latest
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_DEV_HOST }}
username: ${{ secrets.SSH_DEV_USERNAME }}
key: ${{ secrets.SSH_DEPLOY_DEV }}
script: |
docker pull quackai/contribution-api:latest
cd devops && docker compose stop backend && docker compose up -d
docker inspect -f '{{ .Created }}' $(docker compose images -q backend)