From 6663c9f960babfca5de310da31d56c17858fbda5 Mon Sep 17 00:00:00 2001
From: vharseko <vharseko@3a-systems.ru>
Date: Wed, 08 Sep 2021 12:53:52 +0000
Subject: [PATCH] Update deploy.yml

---
 .github/workflows/deploy.yml |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 83841e3..00cf173 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -2,15 +2,14 @@
 
 on:
   workflow_run:
-    push:
-       branches: [ master ]
+    branches: [ master ]
     workflows: ["Build Maven"]
     types: [completed]
   workflow_dispatch:
 jobs:
   deploy:
     name: Maven deploy
-    if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == '' }}
+    if: ${{ github.event.workflow_run.conclusion.event=="push" && (github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == '') }}
     runs-on: 'ubuntu-latest'
     steps:
       - name: Print github context
@@ -45,4 +44,4 @@
           MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
           MAVEN_OPTS: -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.retryHandler.count=10
         if: ${{ env.MAVEN_USERNAME!='' && env.MAVEN_PASSWORD!=''}}
-        run: mvn --batch-mode --update-snapshots -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy --file pom.xml
\ No newline at end of file
+        run: mvn --batch-mode --update-snapshots -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy --file pom.xml

--
Gitblit v1.10.0