From a028b875fbb6ea30fa289c534d4e7a5ca431495c Mon Sep 17 00:00:00 2001 From: Maxim Vershinin Date: Wed, 5 Aug 2026 09:07:00 +0500 Subject: [PATCH] building image actions is triggered only if a pull request has been merged into main --- .gitea/workflows/build_image.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build_image.yaml b/.gitea/workflows/build_image.yaml index ecf1242..7e9c660 100644 --- a/.gitea/workflows/build_image.yaml +++ b/.gitea/workflows/build_image.yaml @@ -1,8 +1,9 @@ name: Build and Push Docker Image on: - push: - branches: [ "ci-cd" ] + pull_request: + types: [closed] + branches: [ main ] env: REGISTRY: git.vmn.su @@ -11,6 +12,7 @@ env: jobs: build-and-push-backend: + if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - name: Checkout code @@ -32,6 +34,7 @@ jobs: build-and-push-frontend: + if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - name: Checkout code @@ -53,6 +56,7 @@ jobs: notify-deployment-server: + if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - name: Trigger the webhook on the deployment server to start pulling the images