7 Commits

Author SHA1 Message Date
Anthony Sterling
61c2f4ac26 Release 202007131324
Some checks failed
goreleaser / goreleaser (push) Has been cancelled
2020-07-13 13:24:50 +01:00
Anthony Sterling
c6f5906aa1 add nil check for create repo response 2020-07-13 13:24:20 +01:00
Andy McKay
216045d0eb Update README.md
Less words, less grammar errors.
2020-07-09 10:59:29 -07:00
Andy McKay
de2c7907a1 Update README.md 2020-07-08 15:39:53 -07:00
Andy McKay
162e340368 Merge pull request #3 from actions/improve-readme.png
Update the readme a bit
2020-07-08 15:39:01 -07:00
Andy McKay
dc659980cd update the readme a bit 2020-07-08 14:50:49 -07:00
Andy McKay
1f37634adc Update ci.yml 2020-07-08 14:42:52 -07:00
4 changed files with 19 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
name: CI
on:
pull_request:
workflow_dispatch:
jobs:
CI:
runs-on: ubuntu-latest

View File

@@ -1,10 +1,22 @@
# actions-sync
# Actions Sync
Sync GitHub Action repositories from https://www.github.com to your GHES instance.
<p align="center">
<img src="docs/arrow.png">
</p>
## Non air-gapped GHES instances
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.
When there are machines which have access to both the public interenet and the the GHES instance run `actions-sync sync`.
* Current status: **ready for production use**
* Download from: [releases page](https://github.com/actions/actions-sync/releases/)
* Build status: ![Actions Sync Status](https://github.com/actions/actions-sync/workflows/CI/badge.svg)
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:**
@@ -35,7 +47,7 @@ When there are machines which have access to both the public interenet and the t
--repo-name actions/setup-node
```
## Air-gapped GHES instances
## Not connected instances
When no machine has access to both the public internet and the GHES instance:

BIN
docs/arrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -93,7 +93,7 @@ func getOrCreateGitHubRepo(ctx context.Context, client *github.Client, repoName,
HasProjects: github.Bool(false),
}
ghRepo, resp, err := client.Repositories.Create(ctx, orgName, repo)
if resp.StatusCode == 422 {
if resp != nil && resp.StatusCode == 422 {
ghRepo, _, err = client.Repositories.Get(ctx, orgName, repoName)
}
if err != nil {