From 00eeb5e130d075de295343260349eb5f2cabb9f6 Mon Sep 17 00:00:00 2001 From: Ihor Kriatov Date: Wed, 10 Jan 2024 17:53:02 +0200 Subject: [PATCH] CI: update workflow to invoke DEV deployment --- .github/workflows/ci.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 79a5c44..385b667 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,13 +3,26 @@ name: Invoker on: pull_request: types: [closed] + push: + branches: + - develop jobs: trigger-workflow: runs-on: ubuntu-latest - if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' steps: - - name: Invoke workflow + - name: Invoke Dev Workflow + if: github.event_name == 'push' && github.ref == 'refs/heads/develop' + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: ${{ vars.GH_BUILD_WORKFLOW }} + repo: ${{ vars.GH_BUILD_REPOSITORY }} + token: ${{ secrets.GH_PAT_TOKEN }} + ref: develop + inputs: '{"repository_url": "${{ github.repository }}","ref":"${{ github.ref }}", "sha":"${{ github.sha }}", "commit_url" : "${{ github.event.head_commit.url }}", "commit_message" : "${{ github.event.head_commit.message }}"}' + + - name: Invoke Prod Workflow + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' uses: benc-uk/workflow-dispatch@v1 with: workflow: ${{ vars.GH_BUILD_WORKFLOW }}