Duplicate Repository #8
Workflow file for this run
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
name: Duplicate Repository | |
on: | |
workflow_dispatch: | |
inputs: | |
destination_user: | |
description: 'Destination user or organization' | |
required: true | |
default: 'eidolon-ai' | |
destination_repo: | |
description: 'Name of the new repository' | |
required: true | |
visibility: | |
description: 'Repository visibility (public or private)' | |
required: true | |
default: 'public' | |
type: choice | |
options: | |
- public | |
- private | |
jobs: | |
duplicate_repository: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
- name: Create new repository | |
env: | |
GH_TOKEN: ${{ secrets.GH_PAT }} | |
run: gh repo create ${{ github.event.inputs.destination_user }}/${{ github.event.inputs.destination_repo }} --${{ github.event.inputs.visibility }} | |
- name: Push to new repository | |
run: | | |
# Push all branches and tags to the new repository | |
git push --mirror https://${{ secrets.GH_PAT }}@github.com/${{ github.event.inputs.destination_user }}/${{ github.event.inputs.destination_repo }}.git |