drone
This commit is contained in:
+20
-11
@@ -3,17 +3,17 @@ type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
- pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
- name: test
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
- pip install --no-cache-dir -r requirements.txt
|
||||
- pip install pytest pytest-asyncio
|
||||
- pytest tests/ -v || true
|
||||
- pip install --no-cache-dir pytest pytest-asyncio
|
||||
- pytest tests/ -v
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
- custom
|
||||
|
||||
- name: docker-build
|
||||
image: plugins/docker
|
||||
@@ -47,14 +47,23 @@ steps:
|
||||
from_secret: ssh_password
|
||||
port: 22
|
||||
script:
|
||||
- docker stop gptchat || true
|
||||
- docker rm gptchat || true
|
||||
- docker login gitea.allowlgroup.ru -u $DOCKER_USER -p $DOCKER_PASS
|
||||
- docker stop gptchat 2>/dev/null || true
|
||||
- docker rm gptchat 2>/dev/null || true
|
||||
- docker pull gitea.allowlgroup.ru/allowlgroup/gptchat:latest
|
||||
- docker run -d --name gptchat -p 8484:8484 gitea.allowlgroup.ru/allowlgroup/gptchat:latest
|
||||
- docker image prune -f
|
||||
envs:
|
||||
- docker_user
|
||||
- docker_pass
|
||||
environment:
|
||||
docker_user:
|
||||
from_secret: docker_username
|
||||
docker_pass:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
- custom
|
||||
|
||||
- custom
|
||||
Reference in New Issue
Block a user