From 9c5ead1e508c5454fdb040c327e0d91a5e2de455 Mon Sep 17 00:00:00 2001 From: Akylbek Utekeshev Date: Fri, 10 Nov 2023 14:41:03 +0600 Subject: [PATCH] MBX-2726 Trigger on Approve PR --- .github/workflows/trigger.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml index 94563c98..59118edb 100644 --- a/.github/workflows/trigger.yml +++ b/.github/workflows/trigger.yml @@ -1,8 +1,11 @@ name: Build PushOk when PR open. on: - pull_request: - types: [opened, synchronize] + push: + branches: + - 'feature/*' + pull_request_review: + types: [submitted] branches: - 'feature/*' @@ -17,12 +20,18 @@ jobs: run: | commits=$(git log -3 --pretty=format:"%s") echo "commits=$commits" >> $GITHUB_ENV - + + - name: Get Mindbox SDK Version + run: | + version=$(grep 'spec.version' Mindbox.podspec | awk '{print $3}' | tr -d '"') + echo "Mindbox SDK Version: $version" + - name: Trigger build workflow in ios-app repo. + if: github.event.review.state == 'approved' uses: benc-uk/workflow-dispatch@v1 with: token: ${{ secrets.PAT_IOS_APP }} workflow: connected_publish_workflow.yml repo: mindbox-cloud/ios-app ref: develop - inputs: '{"branch": "${{ github.head_ref }}", "commits": "${{ env.commits }}"}' + inputs: '{"branch": "${{ github.head_ref }}", "commits": "${{ env.commits }}", "sdkVersion": "${{ env.sdkVersion }}"}'