Skip to content

Support docker image tag filtering in auto deployments for Github #2446

@mattiacerutti

Description

@mattiacerutti

What problem will this feature address?

If application source is docker, and we define a tag for the image, when auto-deployment hook is called from DockerHub, only the events which have the same tag as the tag defined in the image will trigger a deployment (reference).

This does not happen if the webhook is called from Github because the extractImageTagFromRequest doesn't support it

export const extractImageTagFromRequest = (
headers: any,
body: any,
): string | null => {
if (headers["user-agent"]?.includes("Go-http-client")) {
if (body.push_data && body.repository) {
return body.push_data.tag;
}
}
return null;
};

Describe the solution you'd like

Support for Github should be added

Describe alternatives you've considered

No current alternatives

Additional context

Tag from Github could be extracted frombody.package.container_metadata.tag.name (reference)

Will you send a PR to implement it?

Maybe, need help

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions