简体   繁体   中英

GitHub Actions, detect changes in submodule

I have two repositories A and B, both hosted on GitHub.

  • Repo A is static site generator code.
  • Repo B is bunch of text files.

They have to stay separate. I want to rebuild repo A, each time repo B receives an update. It has to work using GitHub Actions only. I'd prefer if repo B would stay action-less, ie no CI/CD attached to that repo (I want it to store only files). I was thinking maybe I can make it work using git submodules? Repo B would be a submodule within Repo A. Is it possible to build GH action within repo A, to detect changes in repo B and pull from there?

edit: Repo A is Static-site generator( nextjs ) I'm intending to share with public. Repo B is full of text files( org-roam ) which a user brings with themselves. Together they build a personal wiki website. I'd want to minimize the configuration hassle - that's why I want to have all CI/CD and code encapsulated in Repo A, so the user could just fork it, and plug-and-play it with their knowledge base repository (repo B). Having intertwined GitHub Actions between two repositories seems not ideal - that's why I'm searching for better solution

thanks to @GuiFalourd and @riQQ, I was able to put together proof-of-concept set of repositories

Both repo share same GitHub Personal Access Token . To fill the blanks from the blog.marcnuri.com guide, here is minimal set of permissions required to make this work (given both repositories are public, otherwise you need repo permission: 在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM