From 43513b3b63974876e41d4c89547a99340d83adf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Th=C3=B6mmes?= Date: Thu, 8 Aug 2024 17:54:46 +0200 Subject: [PATCH] Update all source versions when updating the app Currently, when an app is updated, sources that existed in the app before are **not** updated automatically. This behavior is desired to avoid an app spec change that only changes, for example the scale of a component from picking up new code. By setting the `UpdateAllSourceVersions` flag, the action now forces updates to **all** the sources of the app (either git based or image based) on the update. --- deploy/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/main.go b/deploy/main.go index 3f3a00b..27fdcca 100644 --- a/deploy/main.go +++ b/deploy/main.go @@ -120,7 +120,7 @@ func (d *deployer) deploy(ctx context.Context, spec *godo.AppSpec) (*godo.App, e } } else { d.action.Infof("app %q already exists, updating...", spec.Name) - app, _, err = d.apps.Update(ctx, app.GetID(), &godo.AppUpdateRequest{Spec: spec}) + app, _, err = d.apps.Update(ctx, app.GetID(), &godo.AppUpdateRequest{Spec: spec, UpdateAllSourceVersions: true}) if err != nil { return nil, fmt.Errorf("failed to update app: %w", err) }