Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,57 @@ jobs:

- name: Run pytest
run: pytest -v

push_branch_dev_to_docker_hub:
name: Build and Push Docker(dev)
runs-on: ubuntu-latest
needs: lint

if: github.ref == 'refs/heads/dev'

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push to Docker Hub
uses: docker/build-push-action@v5
with:
push: true
tags: |
dmsn/derbit_client:dev

push_branch_main_to_docker_hub:
name: Build and Push Docker(prod)
runs-on: ubuntu-latest
needs: lint

if: github.ref == 'refs/heads/main'

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push to Docker Hub
uses: docker/build-push-action@v5
with:
push: true
tags: |
dmsn/derbit_client:prod
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- "6379:6379"

backend:
build: .
image: dmsn/derbit_client:dev
restart: always
depends_on:
- db
Expand Down