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