-
Notifications
You must be signed in to change notification settings - Fork 36
39 lines (31 loc) · 1.07 KB
/
dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build Docker Image
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install build-essential
run: sudo apt-get update && sudo apt-get install -y build-essential
- name: Set up Python
run: sudo ln -s /usr/bin/python3 /usr/bin/python
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker Image
run: >-
docker build
--build-arg DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
--build-arg NEXT_PUBLIC_PROCESSOR_URL=https://dev.opentrader.dev
--build-arg NEXT_PUBLIC_PROCESSOR_ENABLE_TRPC=true
--build-arg NEXT_PUBLIC_STATIC=true
--build-arg ADMIN_PASSWORD=password
-t opentrader/opentrader:latest .
- name: Push Docker Image
run: docker push opentrader/opentrader:latest