Skip to content

Commit

Permalink
Expand GetLatestImageDetails to include fly_version (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
davissp14 authored Jan 22, 2025
1 parent fa121d0 commit 13122d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions resource_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ func (client *Client) GetLatestImageTag(ctx context.Context, repository string,
return data.LatestImageTag, nil
}

func (client *Client) GetLatestImageDetails(ctx context.Context, image string) (*ImageVersion, error) {
func (client *Client) GetLatestImageDetails(ctx context.Context, image string, flyVersion string) (*ImageVersion, error) {
query := `
query($image: String!) {
latestImageDetails(image: $image){
query($image: String!, $flyVersion: String) {
latestImageDetails(image: $image, flyVersion: $flyVersion) {
registry
repository
tag
Expand All @@ -40,6 +40,7 @@ func (client *Client) GetLatestImageDetails(ctx context.Context, image string) (
req := client.NewRequest(query)
ctx = ctxWithAction(ctx, "get_latest_image_details")
req.Var("image", image)
req.Var("flyVersion", flyVersion)

data, err := client.RunWithContext(ctx, req)
if err != nil {
Expand Down

0 comments on commit 13122d4

Please sign in to comment.