Skip to content

Commit 38f24b1

Browse files
authored
chore(distroless): Run when event_name == 'workflow_dispatch' (#351)
1 parent f2e4649 commit 38f24b1

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.github/workflows/distroless_core.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ jobs:
5050
context: apps/distroless/core
5151
file: apps/distroless/core/Dockerfile
5252
platforms: linux/amd64,linux/arm64
53-
# push: ${{ github.event_name != 'pull_request' }}
54-
push: true
53+
push: ${{ github.event_name != 'pull_request' }}
5554
tags: celestdev/core-builder:latest
5655
cache-from: type=gha # Pull cache from GitHub Actions cache
5756
cache-to: type=gha,mode=max # Push cache to GitHub Actions cache (mode=max includes all layers)

.github/workflows/distroless_dart.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ jobs:
110110
111111
- name: Build and Push Image (builder)
112112
id: build-push-builder
113-
if: steps.is_needed.outputs.builder == 'true' # Only run if the builder image is needed
113+
# Only run if the builder image is needed or if the workflow is manually triggered
114+
if: steps.is_needed.outputs.builder == 'true' || github.event_name == 'workflow_dispatch'
114115
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # 6.15.0
115116
with:
116117
context: apps/distroless/dart/build
@@ -127,7 +128,8 @@ jobs:
127128

128129
- name: Build and Push Image (runtime)
129130
id: build-push-runtime
130-
if: steps.is_needed.outputs.runtime == 'true' # Only run if the runtime image is needed
131+
# Only run if the runtime image is needed or if the workflow is manually triggered
132+
if: steps.is_needed.outputs.runtime == 'true' || github.event_name == 'workflow_dispatch'
131133
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # 6.15.0
132134
with:
133135
context: apps/distroless/dart/build

.github/workflows/distroless_flutter.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ jobs:
117117
118118
- name: Build and Push Image (engine)
119119
id: build-push-engine
120-
if: steps.is_needed.outputs.engine == 'true' # Only run if the engine image is needed
120+
# Only run if the engine image is needed or if the workflow is triggered manually
121+
if: steps.is_needed.outputs.engine == 'true' || github.event_name == 'workflow_dispatch'
121122
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # 6.15.0
122123
with:
123124
context: apps/distroless/flutter/build
@@ -133,7 +134,8 @@ jobs:
133134

134135
- name: Build and Push Image (builder)
135136
id: build-push-builder
136-
if: steps.is_needed.outputs.builder == 'true' # Only run if the builder image is needed
137+
# Only run if the builder image is needed or if the workflow is triggered manually
138+
if: steps.is_needed.outputs.builder == 'true' || github.event_name == 'workflow_dispatch'
137139
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # 6.15.0
138140
with:
139141
context: apps/distroless/flutter/build
@@ -149,7 +151,8 @@ jobs:
149151

150152
- name: Build and Push Image (runtime)
151153
id: build-push-runtime
152-
if: steps.is_needed.outputs.runtime == 'true' # Only run if the runtime image is needed
154+
# Only run if the runtime image is needed or if the workflow is triggered manually
155+
if: steps.is_needed.outputs.runtime == 'true' || github.event_name == 'workflow_dispatch'
153156
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # 6.15.0
154157
with:
155158
context: apps/distroless/flutter/build

0 commit comments

Comments
 (0)