upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 8m24s

This commit is contained in:
Pasha 2025-08-24 18:10:17 +03:00
parent 2ab5e8b19e
commit 2a53dff66f

@ -1,5 +1,5 @@
name: Deploy Gitea Custom name: Deploy Gitea Custom
run-name: ${{ gitea.actor }} build image and push to container registry run-name: ${{ gitea.actor }} build image and deploy
on: on:
push: push:
@ -8,15 +8,23 @@ on:
jobs: jobs:
build-and-deploy: build-and-deploy:
runs-on: [ubuntu-latest] # runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 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: | 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 - name: Run new container
env: env:
@ -24,12 +32,8 @@ jobs:
DB_USER: ${{ secrets.GITEA_DB_USER }} DB_USER: ${{ secrets.GITEA_DB_USER }}
DB_PASS: ${{ secrets.GITEA_DB_PASS }} DB_PASS: ${{ secrets.GITEA_DB_PASS }}
DB_NAME: ${{ secrets.GITEA_DB_NAME }} DB_NAME: ${{ secrets.GITEA_DB_NAME }}
#todo mb more args
run: | run: |
podman stop gitea-custom || true docker run -d --name gitea-custom \
podman rm gitea-custom || true
podman run -d --name gitea-custom \
-e GITEA__database__DB_TYPE=postgres \ -e GITEA__database__DB_TYPE=postgres \
-e GITEA__database__HOST=$DB_HOST \ -e GITEA__database__HOST=$DB_HOST \
-e GITEA__database__NAME=$DB_NAME \ -e GITEA__database__NAME=$DB_NAME \
@ -38,3 +42,8 @@ jobs:
-p 3001:3000 \ -p 3001:3000 \
--restart unless-stopped \ --restart unless-stopped \
gitea-custom:latest gitea-custom:latest
- name: Verify container is running
run: |
docker ps -a
docker logs gitea-custom --tail 50