A tool for syncing the CodeQL Action from GitHub.com to GitHub Enterprise Server, including copying the CodeQL bundle.
Перейти к файлу
Chris Gavin c2c2c5bf09
Add some required documents for open-sourcing the repository.
2020-08-24 23:02:10 +01:00
.github/workflows Add a `licenses` subcommand that prints the licenses of all dependencies. 2020-08-24 17:01:54 +01:00
.licenses/go Add a `licenses` subcommand that prints the licenses of all dependencies. 2020-08-24 17:01:54 +01:00
cmd Add a `licenses` subcommand that prints the licenses of all dependencies. 2020-08-24 17:01:54 +01:00
docs Add a bunch more details on how to use the tool to the readme. 2020-08-24 14:29:03 +01:00
internal Add a `licenses` subcommand that prints the licenses of all dependencies. 2020-08-24 17:01:54 +01:00
test Implement `push` subcommand. 2020-08-24 12:07:20 +01:00
.gitattributes Add the initial project structure. 2020-08-17 23:16:48 +01:00
.gitignore Add a `licenses` subcommand that prints the licenses of all dependencies. 2020-08-24 17:01:54 +01:00
.golangci.yml Add the initial project structure. 2020-08-17 23:16:48 +01:00
.goreleaser.yml Add a `licenses` subcommand that prints the licenses of all dependencies. 2020-08-24 17:01:54 +01:00
.licensed.yml Implement the pull command. 2020-08-19 15:47:14 +01:00
CODE_OF_CONDUCT.md Add some required documents for open-sourcing the repository. 2020-08-24 23:02:10 +01:00
CONTRIBUTING.md Add some required documents for open-sourcing the repository. 2020-08-24 23:02:10 +01:00
LICENSE.md Add some required documents for open-sourcing the repository. 2020-08-24 23:02:10 +01:00
README.md Add some required documents for open-sourcing the repository. 2020-08-24 23:02:10 +01:00
SECURITY.md Add some required documents for open-sourcing the repository. 2020-08-24 23:02:10 +01:00
go.mod Add a `licenses` subcommand that prints the licenses of all dependencies. 2020-08-24 17:01:54 +01:00
go.sum Add a `licenses` subcommand that prints the licenses of all dependencies. 2020-08-24 17:01:54 +01:00
main.go Add the initial project structure. 2020-08-17 23:16:48 +01:00

README.md

CodeQL Action Sync Tool

Logo

A tool for syncing the CodeQL Action from GitHub.com to GitHub Enterprise Server, including copying the CodeQL bundle. This allows the CodeQL Action to work even if your GitHub Enterprise Server or GitHub Actions runners do not have internet access.

Installation

The CodeQL Action sync tool can be downloaded from the releases page of this repository.

Usage

The sync tool can be used in two different ways.

If you have a machine that is able to access GitHub.com and the GitHub Enterprise Server instance then simply follow the steps under "I have a machine that can access both GitHub.com and GitHub Enterprise Server".

If your GitHub Enterprise Server instance is on a completely isolated network where no machines have access to both GitHub.com and GitHub Enterprise Server then follow the steps under "I don't have a machine that can access both GitHub.com and GitHub Enterprise Server" instead.

I have a machine that can access both GitHub.com and GitHub Enterprise Server.

From a machine with access to both GitHub.com and GitHub Enterprise Server use the ./codeql-action-sync sync command to copy the CodeQL Action and bundles.

Required Arguments:

  • --destination-url - The URL of the GitHub Enterprise Server instance to push the Action to.
  • --destination-token - A Personal Access Token for the destination GitHub Enterprise Server instance. The token should be granted at least the public_repo scope. If the destination repository is in an organization that does not yet exist, your token will need to have the site_admin scope in order to create the organization. The organization can also be created manually or an existing organization used.

Optional Arguments:

  • --cache-dir - A temporary directory in which to store data downloaded from GitHub.com before it is uploaded to GitHub Enterprise Server. If not specified a directory next to the sync tool will be used.
  • --destination-repository - The name of the repository in which to create or update the CodeQL Action. If not specified github/codeql-action will be used.

I don't have a machine that can access both GitHub.com and GitHub Enterprise Server.

From a machine with access to GitHub.com use the ./codeql-action-sync pull command to download a copy of the CodeQL Action and bundles to a local folder.

Optional Arguments:

  • --cache-dir - The directory in which to store data downloaded from GitHub.com. If not specified a directory next to the sync tool will be used.

Next copy the sync tool and cache directory to another machine which has access to GitHub Enterprise Server.

Now use the ./codeql-action-sync push command to upload the CodeQL Action and bundles to GitHub Enterprise Server.

Required Arguments:

  • --destination-url - The URL of the GitHub Enterprise Server instance to push the Action to.
  • --destination-token - A Personal Access Token for the destination GitHub Enterprise Server instance. The token should be granted at least the public_repo scope. If the destination repository is in an organization that does not yet exist, your token will need to have the site_admin scope in order to create the organization. The organization can also be created manually or an existing organization used.

Optional Arguments:

  • --cache-dir - The directory to which the Action was previously downloaded.
  • --destination-repository - The name of the repository in which to create or update the CodeQL Action. If not specified github/codeql-action will be used.

Contributing

For more details on contributing improvements to this tool, see our contributor guide.