Skip to content

Commit

Permalink
Try action
Browse files Browse the repository at this point in the history
  • Loading branch information
seesharprun authored Aug 31, 2023
1 parent f19095d commit 9399e6a
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,12 @@ jobs:
name: Mirror repository
runs-on: ubuntu-latest
steps:
- name: Run mirror action
run: |
ls -la
git status
git config --global --add safe.directory /github/workspace
ls -la
git status
git clone --bare "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" . || exit 1
ls -la
git status
git remote add --mirror=fetch mirror "${REMOTE}" || exit 1
ls -la
git status
git fetch mirror +refs/heads/*:refs/remotes/origin/* || exit 1
ls -la
git status
git push --force --mirror --prune origin || exit 1
ls -la
git status
env:
REMOTE: ${{ env.REPO }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v3
- name: Sync remote repsitory
uses: repo-sync/github-sync@v2
with:
source_repo: 'azurecosmosdb/design-patterns'
source_branch: 'main'
destination_branch: 'main'
github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9399e6a

Please sign in to comment.