feat: implement centralized versioning v1.0.0
This commit is contained in:
@@ -5,6 +5,9 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
VERSION: 1.0.0
|
||||
|
||||
jobs:
|
||||
# ЧАСТЬ 1: Собираем образы и кладем в Gitea (чтобы делиться с ребятами)
|
||||
build-and-push:
|
||||
@@ -26,7 +29,9 @@ jobs:
|
||||
context: .
|
||||
file: src/GmRelay.Bot/Dockerfile
|
||||
push: true
|
||||
tags: git.codeanddice.ru/toutsu/gmrelay-bot:latest
|
||||
tags: |
|
||||
git.codeanddice.ru/toutsu/gmrelay-bot:latest
|
||||
git.codeanddice.ru/toutsu/gmrelay-bot:${{ env.VERSION }}
|
||||
labels: |
|
||||
org.opencontainers.image.source=https://git.codeanddice.ru/${{ gitea.repository }}
|
||||
|
||||
@@ -36,7 +41,9 @@ jobs:
|
||||
context: .
|
||||
file: src/GmRelay.Web/Dockerfile
|
||||
push: true
|
||||
tags: git.codeanddice.ru/toutsu/gmrelay-web:latest
|
||||
tags: |
|
||||
git.codeanddice.ru/toutsu/gmrelay-web:latest
|
||||
git.codeanddice.ru/toutsu/gmrelay-web:${{ env.VERSION }}
|
||||
labels: |
|
||||
org.opencontainers.image.source=https://git.codeanddice.ru/${{ gitea.repository }}
|
||||
|
||||
@@ -59,10 +66,8 @@ jobs:
|
||||
# Авторизуемся локальным докером в нашей Gitea
|
||||
docker login git.codeanddice.ru/ -u toutsu -p ${{ secrets.GIT_TOKEN }}
|
||||
|
||||
# Так как раннер на том же сервере, образ уже закэширован,
|
||||
# но pull гарантирует, что compose подхватит именно свежий latest-тег.
|
||||
# Pull гарантирует, что мы получили нужную версию.
|
||||
docker compose pull bot web
|
||||
|
||||
# Запускаем! Флаг -d оставит их работать в фоне.
|
||||
# БД не перезапустится, так как её образ не менялся.
|
||||
docker compose up -d
|
||||
@@ -1,5 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0</Version>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ services:
|
||||
retries: 10
|
||||
|
||||
bot:
|
||||
image: git.codeanddice.ru/toutsu/gmrelay-bot:latest
|
||||
image: git.codeanddice.ru/toutsu/gmrelay-bot:1.0.0
|
||||
container_name: gmrelay_bot
|
||||
restart: always
|
||||
network_mode: host
|
||||
@@ -30,7 +30,7 @@ services:
|
||||
- "Telegram__BotToken=${TELEGRAM_BOT_TOKEN}"
|
||||
|
||||
web:
|
||||
image: git.codeanddice.ru/toutsu/gmrelay-web:latest
|
||||
image: git.codeanddice.ru/toutsu/gmrelay-web:1.0.0
|
||||
container_name: gmrelay_web
|
||||
restart: always
|
||||
network_mode: host
|
||||
|
||||
Reference in New Issue
Block a user