Code Monkey home page Code Monkey logo

actions-sync's Introduction

Actions Sync

This is a standalone Go tool to allow you to sync from GitHub to a GitHub Enterprise instance. GitHub Enterprise is referred to as GHES throughout this document.

  • Current status: ready for production use
  • Download from: releases page
  • Build status: Actions Sync Status

It is designed to work when:

  • The GitHub Enterprise instance is separate 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:

actions-sync sync

Arguments:

  • cache-dir (required) The directory in which to cache repositories as they are synced. This speeds up re-syncing.
  • destination-url (required) The URL of the GHES instance to sync repositories onto.
  • destination-token (required) A personal access token to authenticate against the GHES instance when uploading repositories. See Destination token scopes below.
  • repo-name (optional) A single repository to be synced. In the format of owner/repo. Optionally if you wish the repository to be named different on your GHES instance you can provide an alias in the format: upstream_owner/upstream_repo:destination_owner/destination_repo
  • repo-name-list (optional) A comma-separated list of repositories to be synced. Each entry follows the format of repo-name.
  • repo-name-list-file (optional) A path to a file containing a newline separated list of repositories to be synced. Each entry follows the format of repo-name.
  • actions-admin-user (optional) The name of the Actions admin user, which will be used for updating the chosen action. To use the default user, pass actions-admin. If not set, the impersonation is disabled. Note that site_admin scope is required in the token for the impersonation to work.

Example Usage:

  actions-sync sync \
    --cache-dir "/tmp/cache" \
    --destination-token "token" \
    --destination-url "https://www.example.com" \
    --repo-name actions/setup-node

Not connected instances

When no machine has access to both the public internet and the GHES instance:

  1. actions-sync pull on a machine with public internet access
  2. copy the provided cache-dir to a machine with access to the GHES instance
  3. run actions-sync push on the machine with access to the GHES instance

Command:

actions-sync pull

Arguments:

  • cache-dir (required) The directory to cache the pulled repositories into.
  • repo-name (optional) A single repository to be synced. In the format of owner/repo. Optionally if you wish the repository to be named different on your GHES instance you can provide an alias in the format: upstream_owner/upstream_repo:destination_owner/destination_repo
  • repo-name-list (optional) A comma-separated list of repositories to be synced. Each entry follows the format of repo-name.
  • repo-name-list-file (optional) A path to a file containing a newline separated list of repositories to be synced. Each entry follows the format of repo-name.

Example Usage:

  bin/actions-sync pull \
    --cache-dir "/tmp/cache" \
    --repo-name actions/setup-node

Command:

actions-sync push

Arguments:

  • cache-dir (required) The directory containing the repositories fetched using the pull command.
  • destination-url (required) The URL of the GHES instance to sync repositories onto.
  • destination-token (required) A personal access token to authenticate against the GHES instance when uploading repositories. See Destination token scopes below.
  • repo-name, repo-name-list or repo-name-list-file (optional) Limit push to specific repositories in the cache directory.
  • actions-admin-user (optional) The name of the Actions admin user, which will be used for updating the chosen action. To use the default user, pass actions-admin. If not set, the impersonation is disabled. Note that site_admin scope is required in the token for the impersonation to work.

Example Usage:

  bin/actions-sync push \
    --cache-dir "/tmp/cache" \
    --destination-token "token" \
    --destination-url "https://www.example.com"

Destination token scopes

When creating a personal access token include the repo and workflow scopes. Include the site_admin scope (optional) if you want organizations to be created as necessary or you want to use the impersonation logic for the push or sync commands.

Contributing

If you would like to contribute your work back to the project, please see CONTRIBUTING.md.

actions-sync's People

Contributors

ajaykn avatar anthonysterling avatar bvennam avatar chrisgavin avatar dependabot[bot] avatar derwasp avatar h2floh avatar hashtagchris avatar hollowman6 avatar joshmgross avatar lowply avatar martincostello avatar niketbp avatar pjquirk avatar thboop avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.