name: Build and deploy Docker image on: push: branches: [main] jobs: build: runs-on: builder env: IMAGE: gitea.dsrptlab.com/optovia/billing/billing steps: - uses: actions/checkout@v4 - 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 run: | docker build -t "$IMAGE:latest" -t "$IMAGE:${{ gitea.sha }}" . docker push "$IMAGE:latest" docker push "$IMAGE:${{ gitea.sha }}" - name: Deploy to Dokploy run: curl -fsS -X POST "https://ind.dsrptlab.com/api/deploy/Q14KToX8PUtric6u9hw6o"