-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
an automated quick commit and push (tpush)
- Loading branch information
1 parent
cc14030
commit 828ff13
Showing
1 changed file
with
16 additions
and
6 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 |
---|---|---|
|
@@ -9,11 +9,21 @@ jobs: | |
mirror: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Mirror script | ||
- name: Mirror repo | ||
run: | | ||
#!/bin/sh -l | ||
REMOTE="https://${{ secrets.MY_TOKEN }}@github.com/t-ibrahimm/t-ibrahimm.github.io.git" | ||
git clone --bare "https://${GITHUB_ACTOR}:${{ secrets.MY_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" . | ||
git remote add --mirror=fetch mirror "$REMOTE" | ||
git fetch mirror +refs/heads/*:refs/remotes/origin/* | ||
git push --force --mirror --prune origin | ||
# Set up user info for Git. | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
# Clone machine-moon/t-website using a token that has read permissions. | ||
# Replace MY_READ_TOKEN with the secret that has read access to machine-moon/t-website. | ||
git clone --bare "https://${{ secrets.MY_READ_TOKEN }}@github.com/machine-moon/t-website.git" repo | ||
cd repo | ||
# Add another remote that has write permissions for t-ibrahimm/t-ibrahimm.github.io | ||
# Replace MY_WRITE_TOKEN with the secret that has push permissions to t-ibrahimm/t-ibrahimm.github.io | ||
git remote add --mirror=fetch mirror "https://${{ secrets.MY_WRITE_TOKEN }}@github.com/t-ibrahimm/t-ibrahimm.github.io.git" | ||
git fetch --all | ||
git push mirror --all --force |