Skip to content

Commit

Permalink
CI: update workflow to invoke DEV deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ikriatov-bb committed Jan 10, 2024
1 parent 0e6881b commit 00eeb5e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 00eeb5e

Please sign in to comment.