Skip to content

Allow custom sourceVersion #132

Open
@maastrich

Description

@maastrich

Context

I am currently working on developing workflows for stack deployment through CodeBuild. This includes a need to terminate previous builds before initiating a new one.
To implement this, I currently list the commit SHA and passes it to the CodeBuild run to stop the previous build.

Issue

I experience functional difficulties with this workflow when rebasing the branch, as the commit tree is completely different following the rebase.

Suggested Solution

Here are my solutions propositions to override the source version.

Proposal 1

The first proposition is to simply pass a source version adhering to the AWS CodeBuild sourceVersion standard.
The proposed implementation is:

- name: Trigger build on Codebuild
  uses: aws-actions/aws-codebuild-run-build@v1
  with:
    project-name: MyProjectName
    sourceVersion: refs/pull/${{ github.event.pull_request.number }}/head # or ${{ github.ref }} or ${{ github.sha }}

Proposal 2

The second proposition is slightly different, using a sourceVersionStrategy parameter instead. The proposed implementation is:

- name: Trigger build on Codebuild
  uses: aws-actions/aws-codebuild-run-build@v1
  with:
    project-name: MyProjectName
    sourceVersionStrategy: pull_request # or branch or sha

Personal notes

I'll be happy to implement this feature if ever approved

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions