Skip to content

split and push github action #8

split and push github action

split and push github action #8

on:
push:
branches:
- main
jobs:
split-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
project:
- data-access-kit
- data-access-kit-symfony
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
steps:
- uses: actions/checkout@v2
- run: |
git config --global user.name "Jakub Kulhan"
git config --global user.email "ahoj@jakubkulhan.cz"
- run: |
mkdir -p ~/.ssh
chmod 600 ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
echo "${{ secrets.DATA_ACCESS_KIT_DEPLOY_KEY }}" | ssh-add -
echo "${{ secrets.DATA_ACCESS_KIT_SYMFONY_DEPLOY_KEY }}" | ssh-add -
- run: git subtree split --prefix=${{ matrix.project }} --branch project-branch
- run: git push --force git@github.com:${{ github.repository_owner }}/${{ matrix.project }}.git project-branch:main