From 3ff3a33cc33ef8af5afd894700e6258aada11255 Mon Sep 17 00:00:00 2001 From: Pasha Date: Sun, 24 Aug 2025 17:25:35 +0300 Subject: [PATCH] upd --- .github/workflows/gitea_deploy.yml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/gitea_deploy.yml diff --git a/.github/workflows/gitea_deploy.yml b/.github/workflows/gitea_deploy.yml new file mode 100644 index 000000000..39485d623 --- /dev/null +++ b/.github/workflows/gitea_deploy.yml @@ -0,0 +1,40 @@ +name: Deploy Gitea Custom +run-name: ${{ gitea.actor }} build image and push to container registry + +on: + push: + branches: + - deploy_custom + +jobs: + build-and-deploy: + runs-on: [DESKTOP-0FNG9JL] # + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build image with podman + run: | + podman build -t gitea-custom:latest . + + - name: Run new container + env: + DB_HOST: ${{ secrets.GITEA_DB_HOST }} + 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 \ + -e GITEA__database__DB_TYPE=postgres \ + -e GITEA__database__HOST=$DB_HOST \ + -e GITEA__database__NAME=$DB_NAME \ + -e GITEA__database__USER=$DB_USER \ + -e GITEA__database__PASSWD=$DB_PASS \ + -p 3001:3000 \ + --restart unless-stopped \ + gitea-custom:latest