Skip to content

Commit

Permalink
[Workflow] MWPW-134543 Dispatch DC workflow when main is changed (#1072)
Browse files Browse the repository at this point in the history
Dispatch DC workflow for pushes
  • Loading branch information
TsayAdobe committed Aug 8, 2023
1 parent 19886f0 commit 1eadabb
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Dispatch workflows

on:
push:
branches:
- main

jobs:
dispatch-dc:
name: Dispatch DC workflow
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
src:
- 'libs/**'
- if: steps.changes.outputs.src == 'true'
name: Trigger DC Workflow
uses: actions/github-script@v6
with:
github-token: ${{ secrets.DC_PAT }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: 'adobecom',
repo: 'dc',
workflow_id: 'test-milo.yml',
ref: 'main',
})

0 comments on commit 1eadabb

Please sign in to comment.