forked from saiteja-madha/discord-js-bot
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: improve git-sync workflow by installing Git with -y flag and u…
…sing global config for user settings
- Loading branch information
1 parent
18a3058
commit cbf9d07
Showing
1 changed file
with
7 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
- name: Install latest Git | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install git | ||
sudo apt-get install -y git | ||
- name: Checkout GitHub repository | ||
uses: actions/checkout@v4 | ||
|
@@ -26,21 +26,19 @@ jobs: | |
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "vixshan" | ||
git config user.email "[email protected]" | ||
git config --global user.name "vixshan" | ||
git config --global user.email "[email protected]" | ||
git config --global http.version HTTP/1.1 | ||
- name: Add GitLab remote | ||
run: | | ||
git remote add gitlab https://oauth2:${GITLAB_TOKEN}@gitlab.com/vikshan/amina.git | ||
git remote add gitlab https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.com/vikshan/amina.git | ||
- name: Fetch and sync with GitLab | ||
run: | | ||
git fetch gitlab | ||
git push -f gitlab refs/remotes/origin/*:refs/heads/* | ||
git push -f gitlab --tags | ||
git pull gitlab --allow-unrelated-histories || true | ||
git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git --all | ||
git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git --tags | ||
env: | ||
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
git push https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git --all | ||
git push https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git --tags |