mirror of
https://gitea.gofwd.group/Forward_Group/ballistic-builder-spring.git
synced 2026-03-06 22:37:58 -05:00
Update .gitea/workflows/deploy.yaml
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
name: Deploy Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- name: Login to Gitea Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login gitea.gofwd.group \
|
||||
-u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Pull latest image
|
||||
run: |
|
||||
docker pull gitea.gofwd.group/forward_group/ballistic-builder-spring/spring-api:latest
|
||||
|
||||
- name: Stop old container
|
||||
run: |
|
||||
docker stop spring-api || true
|
||||
docker rm spring-api || true
|
||||
|
||||
- name: Start new container
|
||||
run: |
|
||||
docker run -d \
|
||||
--name spring-api \
|
||||
--restart unless-stopped \
|
||||
-p 8080:8080 \
|
||||
-e SPRING_PROFILES_ACTIVE=prod \
|
||||
gitea.gofwd.group/forward_group/ballistic-builder-spring/spring-api:latest
|
||||
|
||||
Reference in New Issue
Block a user