Files
Workflow config file is invalid. Please check your config file: yaml: line 7: mapping values are not allowed in this context

36 lines
3.1 KiB
YAML

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