@@ -60,6 +60,7 @@ async function run(): Promise<void> {
6060
6161 const fromEnvironment = core . getInput ( 'from_environment' , { required : false } ) ;
6262 const composeSpec = core . getInput ( 'compose_spec' , { required : false } ) ;
63+ const imageSuffix = core . getInput ( 'image_suffix' , { required : false } ) ;
6364 let minCapacity = core . getInput ( 'min_capacity' , { required : false } ) ;
6465 let maxCapacity = core . getInput ( 'max_capacity' , { required : false } ) ;
6566 const client = new EnvironmentsApi ( baseUrl ) ;
@@ -111,6 +112,11 @@ async function run(): Promise<void> {
111112 createEnvironmentRequest . cloneConfigurationFrom = fromEnvironment ;
112113 }
113114
115+ // Add image suffix if provided - API handles the transformation
116+ if ( imageSuffix ) {
117+ ( createEnvironmentRequest as any ) . imageSuffix = imageSuffix ;
118+ }
119+
114120 // If neither composeSpec nor fromEnvironment provided, we need an empty compose definition
115121 if ( ! composeSpec && ! fromEnvironment ) {
116122 createEnvironmentRequest . composeDefinition = { } ;
@@ -136,11 +142,16 @@ async function run(): Promise<void> {
136142 } ) ;
137143 }
138144
139- const updateEnvironmentRequest = {
145+ const updateEnvironmentRequest : any = {
140146 composeDefinition,
141147 minCapacity : parseInt ( minCapacity ) ,
142148 maxCapacity : parseInt ( maxCapacity ) ,
143149 }
150+
151+ // Add image suffix if provided - API handles the transformation
152+ if ( imageSuffix ) {
153+ updateEnvironmentRequest . imageSuffix = imageSuffix ;
154+ }
144155 try {
145156 const response = await client . updateEnvironment ( organisation , appName , environmentName , removeNullValues ( updateEnvironmentRequest ) ) ;
146157 core . info ( `Successfully updated environment: ${ environmentName } ` ) ;
0 commit comments