From 10cc93104a4228b333aff40e86d1c3441258f872 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Wed, 19 Aug 2026 18:24:44 +0700 Subject: [PATCH] ci: deploy through Earth Dokploy --- .gitea/workflows/build.yaml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 85aaf0f..9051af8 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,6 +1,7 @@ name: Build and deploy Docker image on: + workflow_dispatch: push: branches: [main] @@ -12,24 +13,21 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Isolate Docker auth - run: | - mkdir -p "$RUNNER_TEMP/docker-config" - echo "DOCKER_CONFIG=$RUNNER_TEMP/docker-config" >> "$GITHUB_ENV" - - - name: Login to Gitea Registry - uses: docker/login-action@v3 - with: - registry: gitea.dsrptlab.com - username: ${{ gitea.actor }} - password: ${{ secrets.REGISTRY_TOKEN }} - - - name: Build and push + - name: Build and publish run: | + set -euo pipefail docker build -t "$IMAGE:latest" -t "$IMAGE:${{ gitea.sha }}" . docker push "$IMAGE:latest" docker push "$IMAGE:${{ gitea.sha }}" - docker image rm -f "$IMAGE:latest" "$IMAGE:${{ gitea.sha }}" - - name: Deploy to Dokploy - run: curl -fsS -X POST "https://ind.dsrptlab.com/api/deploy/8KU24cMi_nHB4S16dhDB3" + - name: Remove local image tags + run: docker image rm -f "$IMAGE:latest" "$IMAGE:${{ gitea.sha }}" + + - name: Deploy in Dokploy + env: + DOKPLOY_DEPLOY_WEBHOOK: ${{ secrets.DOKPLOY_DEPLOY_WEBHOOK }} + run: | + set -euo pipefail + test -n "$DOKPLOY_DEPLOY_WEBHOOK" + curl -fsS -X POST "$DOKPLOY_DEPLOY_WEBHOOK" +