MWPW-158777 returning proper response in case of error (#2916) #1091
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: Dispatch workflows | |
on: | |
push: | |
branches: | |
- main | |
- stage | |
jobs: | |
dispatch-dc: | |
name: Dispatch DC workflow | |
if: github.repository == 'adobecom/milo' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
base: ${{ github.ref }} | |
filters: | | |
src: | |
- 'libs/**' | |
- if: steps.changes.outputs.src == 'true' | |
name: Trigger DC Workflow | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.DC_PAT }} | |
script: | | |
github.rest.actions.createWorkflowDispatch({ | |
owner: 'adobecom', | |
repo: 'dc', | |
workflow_id: 'test-milo.yml', | |
ref: 'stage', | |
inputs: { | |
miloBranch: '${{ github.ref_name }}' | |
}, | |
}) |