Skip to content

Try manually

Try manually #5

Workflow file for this run

name: 'Mirror from AzureCosmosDB/design-patterns'
on:
push:
branches:
- __mirror
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
env:
REPO: https://github.com/AzureCosmosDB/design-patterns.git
jobs:
mirror:
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 }}