From 5a67664739608216b972b299e4cc0689ee624ccd Mon Sep 17 00:00:00 2001 From: mt77 Date: Fri, 11 Apr 2025 20:56:44 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20.gitea/workflows/test.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 73a8d0d..7dbac5a 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -1,9 +1,36 @@ name: Build and Test Application on: [push] +env: + GIT_INSTANCE: git01prod.lan jobs: build: runs-on: docker steps: + # Шаг 1: Checkout кода + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + # Шаг 2: Установка Node.js - name: Checkout repository uses: actions/checkout@v3 + + # Шаг 4: Логин в Docker Registry (Gitea) + - name: Login to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: $GIT_INSTANCE # Замените на адрес вашего Gitea + username: ${{ secrets.GIT_USERNAME }} + password: ${{ secrets.GIT_TOKEN }} + + # Шаг 5: Сборка и пуш Docker образа + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: | + $GIT_INSTANCE/${{ secrets.GIT_USERNAME }}/monitor:latest + $GIT_INSTANCE/${{ secrets.GIT_USERNAME }}/monitor:${{ github.sha }}