@@ -2,6 +2,11 @@ name: Distroless (Flutter)
22
33on :
44 workflow_dispatch :
5+ inputs :
6+ replace :
7+ description : Replace the existing distroless image
8+ type : boolean
9+ default : false
510 pull_request :
611 paths :
712 - ' apps/distroless/bin/list_sdks.dart'
@@ -125,7 +130,7 @@ jobs:
125130 - name : Build and Push Image (engine)
126131 id : build-push-engine
127132 # Only run if the engine image is needed or if the workflow is triggered manually
128- if : steps.is_needed.outputs.engine == 'true' || github.event_name == 'workflow_dispatch'
133+ if : steps.is_needed.outputs.engine == 'true' || ( github.event_name == 'workflow_dispatch' && inputs.replace == 'true')
129134 uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # 6.18.0
130135 with :
131136 context : apps/distroless/flutter/build
@@ -140,7 +145,7 @@ jobs:
140145 - name : Build and Push Image (builder)
141146 id : build-push-builder
142147 # Only run if the builder image is needed or if the workflow is triggered manually
143- if : steps.is_needed.outputs.builder == 'true' || github.event_name == 'workflow_dispatch'
148+ if : steps.is_needed.outputs.builder == 'true' || ( github.event_name == 'workflow_dispatch' && inputs.replace == 'true')
144149 uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # 6.18.0
145150 with :
146151 context : apps/distroless/flutter/build
@@ -155,7 +160,7 @@ jobs:
155160 - name : Build and Push Image (runtime)
156161 id : build-push-runtime
157162 # Only run if the runtime image is needed or if the workflow is triggered manually
158- if : steps.is_needed.outputs.runtime == 'true' || github.event_name == 'workflow_dispatch'
163+ if : steps.is_needed.outputs.runtime == 'true' || ( github.event_name == 'workflow_dispatch' && inputs.replace == 'true')
159164 uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # 6.18.0
160165 with :
161166 context : apps/distroless/flutter/build
0 commit comments