How to use the @aws-cdk/aws-codepipeline.GitHubSourceAction function in @aws-cdk/aws-codepipeline

To help you get started, we’ve selected a few @aws-cdk/aws-codepipeline examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github seagull-js / seagull / packages / pipeline / src / lib / cdk / stack.ts View on Github external
private addSourceStage() {
    const placement = { atIndex: 0 }
    const stage = this.pipeline.addStage('SourceStage', { placement })
    const branch = this.branchName
    const oauthToken = this.getToken()
    const owner = this.getOwner()
    const repo = this.getRepo()
    const sourceConfig = { branch, oauthToken, owner, repo, stage }
    // tslint:disable-next-line:no-unused-expression
    this.source = new GitHubSourceAction(this, 'GitHubSource', sourceConfig)
  }
github seagull-js / seagull / packages / deploy-aws / src / seagull_stack.ts View on Github external
addSourceStage(name: string, config: SourceStageConfig) {
    const stageName = name
    const sourceName = `${this.id}-github-${name}`
    const { atIndex, branch, owner, pipeline, poll, repo, oauthToken } = config
    const stage = pipeline.addStage(stageName, { placement: { atIndex } })
    const stageConfig = {
      branch,
      oauthToken,
      outputArtifactName: name,
      owner,
      pollForSourceChanges: poll,
      repo,
      stage,
    }
    return new GitHubSourceAction(this, sourceName, stageConfig)
  }