Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e7eb8c815 | ||
|
|
4a0f705cd2 | ||
|
|
1bf4f689ec |
@@ -1,7 +1,6 @@
|
|||||||
name: CI
|
name: CI
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
|
||||||
jobs:
|
jobs:
|
||||||
CI:
|
CI:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
project_name: gh
|
project_name: actions-sync
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- <<: &build_defaults
|
- <<: &build_defaults
|
||||||
|
|||||||
@@ -1,22 +1,10 @@
|
|||||||
# Actions Sync
|
# actions-sync
|
||||||
|
|
||||||
<p align="center">
|
Sync GitHub Action repositories from https://www.github.com to your GHES instance.
|
||||||
<img src="docs/arrow.png">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
This is a standalone Go tool to allow you to sync from [GitHub](https://www.github.com) to a [GitHub Enterprise instance](https://github.com/enterprise). GitHub Enterprise is referred to as `GHES` throughout this document.
|
## Non air-gapped GHES instances
|
||||||
|
|
||||||
* Current status: **ready for production use**
|
When there are machines which have access to both the public interenet and the the GHES instance run `actions-sync sync`.
|
||||||
* Download from: [releases page](https://github.com/actions/actions-sync/releases/)
|
|
||||||
* Build status: 
|
|
||||||
|
|
||||||
It is designed to work when:
|
|
||||||
* The GitHub Enterprise instance is seperate from the rest of the internet.
|
|
||||||
* The GitHub Enterprise instance is connected to the rest of the internet.
|
|
||||||
|
|
||||||
## Connected instances
|
|
||||||
|
|
||||||
When there are machines which have access to both the public internet and the GHES instance run `actions-sync sync`.
|
|
||||||
|
|
||||||
**Command:**
|
**Command:**
|
||||||
|
|
||||||
@@ -47,7 +35,7 @@ When there are machines which have access to both the public internet and the GH
|
|||||||
--repo-name actions/setup-node
|
--repo-name actions/setup-node
|
||||||
```
|
```
|
||||||
|
|
||||||
## Not connected instances
|
## Air-gapped GHES instances
|
||||||
|
|
||||||
When no machine has access to both the public internet and the GHES instance:
|
When no machine has access to both the public internet and the GHES instance:
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.8 KiB |
+1
-1
@@ -93,7 +93,7 @@ func getOrCreateGitHubRepo(ctx context.Context, client *github.Client, repoName,
|
|||||||
HasProjects: github.Bool(false),
|
HasProjects: github.Bool(false),
|
||||||
}
|
}
|
||||||
ghRepo, resp, err := client.Repositories.Create(ctx, orgName, repo)
|
ghRepo, resp, err := client.Repositories.Create(ctx, orgName, repo)
|
||||||
if resp != nil && resp.StatusCode == 422 {
|
if resp.StatusCode == 422 {
|
||||||
ghRepo, _, err = client.Repositories.Get(ctx, orgName, repoName)
|
ghRepo, _, err = client.Repositories.Get(ctx, orgName, repoName)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user