add compose and add ci filter #6

Merged
sailor merged 2 commits from builder-local into main 2026-07-10 12:44:51 +03:00
2 changed files with 29 additions and 5 deletions
+20 -5
View File
@@ -1,16 +1,31 @@
name: Docker Build and Push name: Docker Build and Push # Имя CI джобы
on: on: # Выполняется если производится push в ветку main
push: push:
branches: [ main ] branches: [ main ]
env: env: # Переменные окружения
REGISTRY: gitea.trastinfo.ru REGISTRY: gitea.trastinfo.ru
IMAGE_NAME: sailor/mkdocs IMAGE_NAME: sailor/mkdocs
PLATFORMS: linux/amd64,linux/arm64 PLATFORMS: linux/amd64,linux/arm64
jobs: jobs: # Список выполняемых джоб
build: check-changes: # джоба проверки изменений в файлах
runs-on: ubuntu-latest
outputs:
src_changed: ${{ steps.filter.outputs.src }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
src:
- 'requirements.txt'
build: # джоба сборки и пуша образа. Выполняется если проверка изменений показала что requirements.txt был изменен
needs: check-changes
if: needs.check-changes.outputs.src_changed == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Login to Gitea Registry - name: Login to Gitea Registry
+9
View File
@@ -0,0 +1,9 @@
services:
mkdocks:
image: gitea.trastinfo.ru/sailor/mkdocs:latest
restart: always
volumes:
- ./mkdocs.yml:/mkdocs/mkdocs.yml
- ./docs:/mkdocs/docs
ports:
- "8000:8000"