Skip to content

Commit

Permalink
Retain commit authors for split monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 21, 2024
1 parent 0d1280c commit 93c1670
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions .github/workflows/split-monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,17 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd hyde
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email [email protected]
git config user.name "$COMMIT_AUTHOR_NAME"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hyde.git
git add .
Expand Down Expand Up @@ -114,15 +116,17 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd framework
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email [email protected]
git config user.name "$COMMIT_AUTHOR_NAME"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/framework.git
git add .
Expand Down Expand Up @@ -163,15 +167,17 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd realtime-compiler
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email [email protected]
git config user.name "$COMMIT_AUTHOR_NAME"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/realtime-compiler.git
git add .
Expand Down Expand Up @@ -211,15 +217,17 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd hydefront
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email [email protected]
git config user.name "$COMMIT_AUTHOR_NAME"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hydefront.git
git add .
Expand Down Expand Up @@ -263,15 +271,17 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd website
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email [email protected]
git config user.name "$COMMIT_AUTHOR_NAME"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hydephp.com.git
git add .
Expand Down Expand Up @@ -312,15 +322,17 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd testing
if ! [[ `git status --porcelain` ]]; then
echo "No changes to this package. Exiting gracefully.";
exit 0;
fi
git config user.name github-actions
git config user.email [email protected]
git config user.name "$COMMIT_AUTHOR_NAME"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/testing.git
git add .
Expand Down Expand Up @@ -360,6 +372,8 @@ jobs:
- name: Commit and push changes
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
cd ui-kit
Expand All @@ -368,8 +382,8 @@ jobs:
exit 0;
fi
git config user.name github-actions
git config user.email [email protected]
git config user.name "$COMMIT_AUTHOR_NAME"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/ui-kit.git
git add .
Expand Down

0 comments on commit 93c1670

Please sign in to comment.