Skip to content
On this page

Submodule 부모 리포지토리 push

Submodule 부모 리포지토리 push

자식 서브모듈 리포지토리를 push했을 때 부모 리포지토리 pull 당겨서 push하는 깃허브 액션 스크립트 예제

name: <이름>
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: ${{ github.repository_owner }}/<리포지토리 주소>
fetch-depth: 0
token: ${{secrets.PAT}}
submodules: true
- run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreplay.github.com
git submodule foreach git pull origin main
git add <submodule 이름>
git commit -m "<커밋메세지>"
git push

참조