Add custom metas to Get project and keep original values when updatin… #170
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Invoker | |
on: | |
pull_request: | |
types: [closed] | |
push: | |
branches: | |
- develop | |
workflow_dispatch: | |
jobs: | |
trigger-workflow: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Invoke Dev Workflow | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.event.inputs.manual_trigger == 'true') | |
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 }} | |
repo: ${{ vars.GH_BUILD_REPOSITORY }} | |
token: ${{ secrets.GH_PAT_TOKEN }} | |
ref: main | |
inputs: '{"repository_url": "${{ github.repository }}","ref":"${{ github.ref }}", "pullrequest_id":"${{ github.event.pull_request.number }}"}' |