> **Experimental**
>
> `@aws-cdk/aws-apprunner-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# GithubSource

Represents the service source from a Github repository.

Extends: Source › GithubSource

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/service.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts#L453)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as apprunner_alpha from '@aws-cdk/aws-apprunner-alpha';

declare const gitHubConnection: apprunner_alpha.GitHubConnection;
declare const runtime: apprunner_alpha.Runtime;
declare const secret: apprunner_alpha.Secret;
const githubSource = new apprunner_alpha.GithubSource({
  configurationSource: apprunner_alpha.ConfigurationSourceType.REPOSITORY,
  connection: gitHubConnection,
  repositoryUrl: 'repositoryUrl',

  // the properties below are optional
  branch: 'branch',
  codeConfigurationValues: {
    runtime: runtime,

    // the properties below are optional
    buildCommand: 'buildCommand',
    environment: {
      environmentKey: 'environment',
    },
    environmentSecrets: {
      environmentSecretsKey: secret,
    },
    environmentVariables: {
      environmentVariablesKey: 'environmentVariables',
    },
    port: 'port',
    startCommand: 'startCommand',
  },
});
```

## Initializer

```ts
new GithubSource(props: GithubRepositoryProps)
```

## Methods

- `bind(_scope: Construct): SourceConfig` — Called when the Job is initialized to allow this object to bind.

- `fromAsset(props: AssetProps): AssetSource` (static) — Source from local assets.

- `fromEcr(props: EcrProps): EcrSource` (static) — Source from the ECR repository.

- `fromEcrPublic(props: EcrPublicProps): EcrPublicSource` (static) — Source from the ECR Public repository.

- `fromGitHub(props: GithubRepositoryProps): GithubSource // chainable` (static) — Source from the GitHub repository.
