fix: 런타임 에러 수정 #122
This file contains 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
name: sync client to main repository | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Github main repository | |
uses: actions/checkout@v3 | |
with: | |
repository: ablej-ssafy/ai-headhunting | |
token: ${{ secrets.GIT_TOKEN }} | |
fetch-depth: 0 | |
- name: Checkout client repository | |
uses: actions/checkout@v3 | |
with: | |
repository: ablej-ssafy/client | |
path: temp_client | |
fetch-depth: 0 | |
- name: Get client last commit author | |
id: get-author | |
working-directory: temp_client | |
run: echo "author=$(git log -1 --pretty=format:'%an')" >> $GITHUB_OUTPUT | |
- name: Get client last commit author email | |
id: get-author-email | |
working-directory: temp_client | |
run: echo "email=$(git log -1 --pretty=format:'%ae')" >> $GITHUB_OUTPUT | |
- name: Configure Git | |
run: | | |
git config --global user.name "${{ steps.get-author.outputs.author }}" | |
git config --global user.email "${{ steps.get-author-email.outputs.email }}" | |
- name: Add client as subtree | |
run: | | |
git remote add client https://github.com/ablej-ssafy/client.git | |
git fetch client develop | |
git subtree pull --prefix=client client develop --message "Sync client to main repository" | |
- name: Push changes to Github | |
run: | | |
git push origin develop |