Starting github action in frontend repo when backend repo changes (w/o backend repo knowing the existence of frontend repo)

The other commenter is correct... You can't just dispatch a workflow in another repository if the calling repository doesn't know it exists. It's also an anti pattern.

It's like you never asking this question and then wondering why nobody responded... Literally just doesn't make sense.

If this is IaC specific, put the deployment instructions in your application repo rather than separating it out. IaC doesn't have to live with it, but presumably you're not changing the actual infrastructure every time you change your codebase.

If this is actual FE/BE code, then there should not be a strict reliance on each other to deploy. Use feature flags and API versioning to make sure there is compatibility between versions. This is how you successfully get microservices architecture. It's not a microservice if the same monolithic dependency exists, no matter how much you break the underlying infra out.

All that said, if this is all a hard requirement, you're stuck using a GH Actions workflow and making a API call to perform a repository dispatch. You will have to make the calling repository aware of the dependent repository. That just is how it works.

/r/devops Thread Parent