github-sync
github-sync copied to clipboard
[Feature Request] Allow destination with custom domain (GHES)
When I using Github enterprise server with our custom domain, we can simply fetch repo from github.com, but when pushing to internal repo, the error log shows:
fatal: repository 'https://github.com/<org-name>/<repo-name>/' not found
In fact, the behavior is right because we do not have that repo on github.com, but only in our Github enterprise server.
I create this actions file in our internal repo in our Github enterprise server to sync from github.com.
name: Sync from Github.com
on:
schedule:
- cron: "*/15 * * * *"
workflow_dispatch:
jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: repo-sync
uses: repo-sync/github-sync@v2
with:
source_repo: "${{secrets.SOURCE_REPO}}"
source_branch: "*"
destination_branch: "*"
github_token: ${{ secrets.PAT }}
sync_tags: "true"
As we using custom domain rather than github.com, I think it is good to have an option to change the prefix or the full repository name before we set the "destination branch", for example, add a destination_repo
option in actions.
@repo-sync/reviewers can you assign this to yourself?
We welcome community contributions.