Skip to content

test notify-parent-repo.yml #5

test notify-parent-repo.yml

test notify-parent-repo.yml #5

name: Notify Parent Repo
on:
push:
branches:
- main
jobs:
update-parent:
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.PARENT_REPO_TOKEN }}
- name: Checkout parent repository
uses: actions/checkout@v6
with:
repository: ${{ vars.PARENT_ORG }}/${{ vars.PARENT_REPO }}
path: ${{ vars.PARENT_REPO }}
token: ${{ secrets.PARENT_REPO_TOKEN }}
submodules: recursive
- name: Commit changes to parent repo
run: |
cp -r ./* ./${{ vars.PARENT_REPO }}/
cd ./${{ vars.PARENT_REPO }}
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add --all
git commit -m "Update submodules, triggered by ${GITHUB_REPOSITORY}" || echo "No changes to commit"
git push origin main