Skip to content

Commit

Permalink
split and push github action
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubkulhan committed May 23, 2024
1 parent ce7a428 commit 8cd0a53
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/split-and-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
branches:
- main

jobs:
split-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
project:
- name: data-access-kit
key: ${{ secrets.DATA_ACCESS_KIT_DEPLOY_KEY }}
- name: data-access-kit-symfony
key: ${{ secrets.DATA_ACCESS_KIT_SYMFONY_DEPLOY_KEY }}
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_AGENT_SOCK > /dev/null
echo "${{ matrix.project.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

0 comments on commit 8cd0a53

Please sign in to comment.