Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow destination with custom domain (GHES) #114

Open
oldking139 opened this issue Oct 14, 2023 · 2 comments
Open

[Feature Request] Allow destination with custom domain (GHES) #114

oldking139 opened this issue Oct 14, 2023 · 2 comments

Comments

@oldking139
Copy link

oldking139 commented Oct 14, 2023

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.

@peterbe
Copy link

peterbe commented Oct 23, 2023

@repo-sync/reviewers can you assign this to yourself?

@heiskr
Copy link
Contributor

heiskr commented Oct 30, 2023

We welcome community contributions.

coopernetes added a commit to coopernetes/github-sync that referenced this issue Jan 4, 2024
* add a bunch of new inputs into the action to allow a remote repo/host to be used as the upstream or destination of the sync.
* the new API surface on the action isn't the best but should be compatible with the existing usage (relying on running the workflow on the source repo and read in the builtin env vars from GitHub Actions)

related: repo-sync#114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants