Skip to content

merge???

merge??? #12

Workflow file for this run

name: Distribute Changes
on:
push:
branches:
- main
jobs:
update-subtrees:
runs-on: ubuntu-latest
strategy:
matrix:
module: ['terraform-backend-manager']
steps:
- name: Checkout main repository
uses: actions/checkout@v4
- name: Set up Git
run: |
git config --unset-all http.https://github.com/.extraheader
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
# - name: Add the target repo as a subtree
# run: |
# git remote add ${{matrix.module}} https://github.com/Apollo-XIV/${{matrix.module}}.git
# git fetch ${{matrix.module}}
# git subtree add --prefix=${{matrix.module}} ${{matrix.module}} main --squash || echo "Subtree already exists, skipping add."
- name: Pull latest changes from the target repo
run: |
git subtree merge --prefix=${{matrix.module}} https://$GITHUB_ACTOR:${{secrets.PERSONAL_ACCESS_TOKEN}}@github.com/Apollo-XIV/${{matrix.module}}.git main
- name: Push changes back to target repo
run: |
git subtree push --prefix=${{matrix.module}} https://$GITHUB_ACTOR:${{secrets.PERSONAL_ACCESS_TOKEN}}@github.com/Apollo-XIV/${{matrix.module}}.git main
- name: Clean up remotes
run: git remote remove ${{matrix.module}}