Compare commits

..
11 Commits
Author SHA1 Message Date
monster 3157d215c1 ci: remove redundant docker compose build from deploy
Create and publish a Docker image / build-and-push-image (push) Successful in 1m48s
2026-08-21 10:37:18 +03:00
monster 1f553fa07e test: debug runners
Create and publish a Docker image / build-and-push-image (push) Successful in 2m32s
2026-08-08 13:49:02 +03:00
monster bf5d87094c test: VM runners active?
Create and publish a Docker image / build-and-push-image (push) Failing after 13m16s
2026-08-08 13:43:20 +03:00
monster 81a49c1a5e test: VM runners take tasks?
Create and publish a Docker image / build-and-push-image (push) Failing after 11m23s
2026-08-08 13:40:03 +03:00
monster 011de9e56a test: does runner2 take tasks?
Create and publish a Docker image / build-and-push-image (push) Failing after 12m23s
2026-08-08 13:14:13 +03:00
monster e5264df7c9 test: fresh push after restart
Create and publish a Docker image / build-and-push-image (push) Failing after 12m11s
2026-08-08 13:09:22 +03:00
monster 230359a6ac test: run3
Create and publish a Docker image / build-and-push-image (push) Failing after 12m25s
2026-08-08 13:04:10 +03:00
monster 1106209cd6 test: LXC runner debug attempt 2
Create and publish a Docker image / build-and-push-image (push) Failing after 10m9s
2026-08-08 13:01:23 +03:00
monster b2406557d1 test: check new LXC runners
Create and publish a Docker image / build-and-push-image (push) Failing after 10m5s
2026-08-08 12:56:27 +03:00
monster 77fa521e70 Add json-file logging limits to compose
Create and publish a Docker image / build-and-push-image (push) Successful in 1m43s
2026-08-08 12:30:32 +03:00
monster 725216134b Add Gitea CI: build/push to registry, deploy via Actions
Create and publish a Docker image / build-and-push-image (push) Successful in 5m10s
2026-08-08 12:29:48 +03:00
2 changed files with 62 additions and 0 deletions

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
name: Create and publish a Docker image
on:
push:
branches: [ "master" ]
env:
REGISTRY: gitea.yandex5.ru
IMAGE_NAME: monster/pepper_bot
jobs:
build-and-push-image:
runs-on: ubuntu-latest
if: ${{ github.server_url != 'https://github.com' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
labels: ${{ steps.meta.outputs.labels }}
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_GITEA_PRIVATE_KEY }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Adding Known Hosts
run: ssh-keyscan -p ${{ vars.SSH_PORT }} -H ${{ vars.SSH_HOST }} >> ~/.ssh/known_hosts
- name: "Deploy to server"
run: ssh monster@${{ vars.SSH_HOST }} -p ${{ vars.SSH_PORT }} 'cd docker.services/pepper_bot && git pull && docker login ${{ env.REGISTRY }} -u ${{ vars.REGISTRY_USERNAME }} --password ${{ secrets.REGISTRY_TOKEN }} && docker compose pull && docker compose up -d && docker system prune --force'
- name: Send message to Telegram
uses: Lukasss93/telegram-action@v2
env:
TELEGRAM_TOKEN: ${{ vars.TELEGRAM_TOKEN }}
TELEGRAM_CHAT: 123622180
+6
View File
@@ -4,6 +4,7 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
image: gitea.yandex5.ru/monster/pepper_bot:master
container_name: pepper-bot container_name: pepper-bot
environment: environment:
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN} - TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
@@ -14,4 +15,9 @@ services:
ports: ports:
- "9001:8080" - "9001:8080"
restart: unless-stopped restart: unless-stopped
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"