From 2a53dff66fbfc5c208a43201f1148ae8d3f2e480 Mon Sep 17 00:00:00 2001 From: Pasha Date: Sun, 24 Aug 2025 18:10:17 +0300 Subject: [PATCH] upd --- .gitea/workflows/gitea_deploy.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/gitea_deploy.yml b/.gitea/workflows/gitea_deploy.yml index b7d623158..f7757fce4 100644 --- a/.gitea/workflows/gitea_deploy.yml +++ b/.gitea/workflows/gitea_deploy.yml @@ -1,5 +1,5 @@ name: Deploy Gitea Custom -run-name: ${{ gitea.actor }} build image and push to container registry +run-name: ${{ gitea.actor }} build image and deploy on: push: @@ -8,15 +8,23 @@ on: jobs: build-and-deploy: - runs-on: [ubuntu-latest] # + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Build image with podman + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Docker image run: | - podman build -t gitea-custom:latest . + docker build -t gitea-custom:latest . + + - name: Stop and remove existing container + run: | + docker stop gitea-custom || true + docker rm gitea-custom || true - name: Run new container env: @@ -24,12 +32,8 @@ jobs: DB_USER: ${{ secrets.GITEA_DB_USER }} DB_PASS: ${{ secrets.GITEA_DB_PASS }} DB_NAME: ${{ secrets.GITEA_DB_NAME }} - #todo mb more args run: | - podman stop gitea-custom || true - podman rm gitea-custom || true - - podman run -d --name gitea-custom \ + docker run -d --name gitea-custom \ -e GITEA__database__DB_TYPE=postgres \ -e GITEA__database__HOST=$DB_HOST \ -e GITEA__database__NAME=$DB_NAME \ @@ -38,3 +42,8 @@ jobs: -p 3001:3000 \ --restart unless-stopped \ gitea-custom:latest + + - name: Verify container is running + run: | + docker ps -a + docker logs gitea-custom --tail 50 \ No newline at end of file