diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 5b6c6a7..7092b41 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,4 +1,4 @@ -name: Build Docker Image +name: Build and deploy Docker image on: push: @@ -6,13 +6,12 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: builder + env: + IMAGE: gitea.dsrptlab.com/optovia/billing/billing steps: - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Gitea Registry uses: docker/login-action@v3 with: @@ -20,12 +19,11 @@ jobs: username: ${{ gitea.actor }} password: ${{ secrets.REGISTRY_TOKEN }} - - name: Build and Push - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: gitea.dsrptlab.com/optovia/billing/billing:latest + - 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 -k -X POST "https://dokploy.dsrptlab.com/api/deploy/compose/K0dZrcbOfbsmAyD1y8VwE" + run: curl -fsS -X POST "https://ind.dsrptlab.com/api/deploy/Q14KToX8PUtric6u9hw6o"