15
15
type : boolean
16
16
version :
17
17
description : The version used when tagging the image
18
- default : dev
18
+ default : ' dev'
19
19
required : false
20
20
type : string
21
21
@@ -101,23 +101,22 @@ jobs:
101
101
- uses : actions/checkout@v3
102
102
with :
103
103
fetch-depth : 0
104
- - name : Check for file changes
104
+ - name : Check for changes and set push options
105
105
id : check_changes
106
- if : ${{ !inputs.push }}
107
106
run : |
108
107
DOCKERFILE_DIR=$(dirname ${{ matrix.file_tag.file }})
109
108
FILES_CHANGED=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- $DOCKERFILE_DIR)
110
- if [ -z "$FILES_CHANGED" ]; then
109
+ FORCE_PUSH=${{ inputs.push }}
110
+ if [ "$FORCE_PUSH" = true ]; then
111
+ echo "Force push is enabled, proceeding with build."
112
+ echo "skip='false'" >> "$GITHUB_OUTPUT"
113
+ elif [ -z "$FILES_CHANGED" ]; then
111
114
echo "No changes in ${{ matrix.file_tag.context }}, skipping build."
112
- echo "skip=true" >> "$GITHUB_OUTPUT"
115
+ echo "skip=' true' " >> "$GITHUB_OUTPUT"
113
116
else
114
117
echo "Changes detected in ${{ matrix.file_tag.context }}, proceeding with build."
115
- echo "skip=false" >> "$GITHUB_OUTPUT"
118
+ echo "skip=' false' " >> "$GITHUB_OUTPUT"
116
119
fi
117
- - name : Override skip for push
118
- if : ${{ inputs.push }}
119
- run : echo "skip=false" >> "$GITHUB_OUTPUT"
120
- id : override_skip
121
120
- name : Log in to the Container registry
122
121
uses : docker/login-action@v3
123
122
with :
@@ -142,7 +141,7 @@ jobs:
142
141
[worker.oci]
143
142
max-parallelism = 2
144
143
- name : Matrix Build and push demo images
145
- if : steps.check_changes.outputs.skip == 'false' || steps.override_skip.outputs.skip == 'false'
144
+ if : steps.check_changes.outputs.skip == 'false'
146
145
147
146
with :
148
147
context : ${{ matrix.file_tag.context }}
0 commit comments