I’m working with two GitHub Actions workflow files: one for a SHARED-PROJECT and one for a DEPENDANT-PROJECT. I’m trying to trigger the DEPENDANT-PROJECT workflow using workflow_run whenever there’s a change in SHARED-PROJECT. However, I’m encountering an issue where the DEPENDANT-PROJECT workflow is not being triggered when there’s a change in the SHARED-PROJECT.
Here are the workflow files:
SHARED-PROJECT-CI-BUILD
name: SHARED-PROJECT-CI-BUILD
on:
push:
branches-ignore:
- master
paths:
- 'shared-project/**'
jobs:
ci-build:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Checkout Source
id: checkout
uses: actions/checkout@v4
- name: Build Master
id: buildmaster
run: |
./shared-project/publish.sh
DEPENDANT-PROJECT-CI-BUILD
name: DEPENDANT-PROJECT-CI-BUILD
on:
push:
branches-ignore:
- master
paths:
- 'dependant-project/**'
workflow_run:
workflows: ["SHARED-PROJECT-CI-BUILD"]
types:
- completed
jobs:
ci-build:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_run'
steps:
- name: Checkout Source
id: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Build Master
id: buildmaster
run: |
./dependant-project/publish.sh
What might I be missing in my configuration that’s preventing the DEPENDANT-PROJECT workflow from triggering when there’s a change in SHARED-PROJECT?
Thanks for your help!