split and push github action #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
jobs: | |
split-and-push: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
project: | |
- data-access-kit | |
- data-access-kit-symfony | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
git config --global user.name "Jakub Kulhan" | |
git config --global user.email "ahoj@jakubkulhan.cz" | |
- run: git subtree split --prefix=${{ matrix.project }} --branch project-branch | |
- run: git remote add project-origin https://x-access-token:${{ secrets.PUSH_GITHUB_TOKEN }}@github.com/${{ github.repository_owner }}/${{ matrix.project }} | |
- run: git push --force project-origin project-branch:main |