optimize gitea_deploy
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 14m27s

This commit is contained in:
pasha1coil 2025-08-26 09:22:48 +03:00
parent 4ec7102537
commit 0650c1a984

@ -7,10 +7,8 @@ on:
- deploy_custom
env:
GITEA_VERSION: deploy_custom
CONTAINER_NAME: gitea-production
VOLUME_NAME: gitea_data
CONTAINER_HOST: unix:///run/user/1000/podman/podman.sock
jobs:
build-and-deploy:
@ -23,19 +21,12 @@ jobs:
- name: Build container image
run: |
podman build \
--build-arg GITEA_VERSION=${{ env.GITEA_VERSION }} \
-t gitea-custom:${{ github.sha }} .
- name: Stop existing container
run: |
podman stop ${{ env.CONTAINER_NAME }} || true
- name: Backup current container (optional)
run: |
podman commit ${{ env.CONTAINER_NAME }} gitea-backup:$(date +%Y%m%d_%H%M%S) || true
--build-arg GITEA_VERSION=${{ github.ref_name }} \
-t gitea-custom:${{ github.ref_name }} .
- name: Remove old container
run: |
podman stop ${{ env.CONTAINER_NAME }} || true
podman rm ${{ env.CONTAINER_NAME }} || true
- name: Run new container with data persistence
@ -53,7 +44,7 @@ jobs:
-p 3001:3000 \
-p 2223:22 \
--restart unless-stopped \
localhost/gitea-custom:${{ github.sha }}
localhost/gitea-custom::${{ github.ref_name }}
#jobs:
# build-and-deploy: