Class GitHubSourceAction.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GitHubSourceAction>
- Enclosing class:
GitHubSourceAction
GitHubSourceAction
.-
Method Summary
Modifier and TypeMethodDescriptionactionName
(String actionName) The physical, human-readable name of the Action.The branch to use.build()
static GitHubSourceAction.Builder
create()
oauthToken
(SecretValue oauthToken) A GitHub OAuth token to use for authentication.The GitHub account/user that owns the repo.The name of the repo, without the username.The runOrder property for this Action.trigger
(GitHubTrigger trigger) How AWS CodePipeline should be triggered.variablesNamespace
(String variablesNamespace) The name of the namespace to use for variables emitted by this action.
-
Method Details
-
create
- Returns:
- a new instance of
GitHubSourceAction.Builder
.
-
actionName
The physical, human-readable name of the Action.Note that Action names must be unique within a single Stage.
- Parameters:
actionName
- The physical, human-readable name of the Action. This parameter is required.- Returns:
this
-
runOrder
The runOrder property for this Action.RunOrder determines the relative order in which multiple Actions in the same Stage execute.
Default: 1
- Parameters:
runOrder
- The runOrder property for this Action. This parameter is required.- Returns:
this
- See Also:
-
variablesNamespace
The name of the namespace to use for variables emitted by this action.Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set
- Parameters:
variablesNamespace
- The name of the namespace to use for variables emitted by this action. This parameter is required.- Returns:
this
-
oauthToken
A GitHub OAuth token to use for authentication.It is recommended to use a Secrets Manager
Secret
to obtain the token:const oauth = cdk.SecretValue.secretsManager('my-github-token'); new GitHubSource(this, 'GitHubAction', { oauthToken: oauth, ... });
The GitHub Personal Access Token should have these scopes:
- repo - to read the repository
- admin:repo_hook - if you plan to use webhooks (true by default)
- Parameters:
oauthToken
- A GitHub OAuth token to use for authentication. This parameter is required.- Returns:
this
- See Also:
-
output
- Parameters:
output
- This parameter is required.- Returns:
this
-
owner
The GitHub account/user that owns the repo.- Parameters:
owner
- The GitHub account/user that owns the repo. This parameter is required.- Returns:
this
-
repo
The name of the repo, without the username.- Parameters:
repo
- The name of the repo, without the username. This parameter is required.- Returns:
this
-
branch
The branch to use.Default: "master"
- Parameters:
branch
- The branch to use. This parameter is required.- Returns:
this
-
trigger
How AWS CodePipeline should be triggered.With the default value "WEBHOOK", a webhook is created in GitHub that triggers the action With "POLL", CodePipeline periodically checks the source for changes With "None", the action is not triggered through changes in the source
To use
WEBHOOK
, your GitHub Personal Access Token should have admin:repo_hook scope (in addition to the regular repo scope).Default: GitHubTrigger.WEBHOOK
- Parameters:
trigger
- How AWS CodePipeline should be triggered. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GitHubSourceAction>
- Returns:
- a newly built instance of
GitHubSourceAction
.
-