File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 73
73
CODER_BASE_IMAGE_TAG : ${{ steps.set_tags.outputs.CODER_BASE_IMAGE_TAG }}
74
74
CODER_IMAGE_TAG : ${{ steps.set_tags.outputs.CODER_IMAGE_TAG }}
75
75
NEW : ${{ steps.check_deployment.outputs.NEW }}
76
- BUILD : ${{ steps.build_conditionals.outputs.build_condition_1 == 'true' || steps.build_conditionals.outputs.build_condition_2 == 'true' || steps.build_conditionals.outputs.build_condition_3 == 'true' || steps.build_conditionals.outputs.build_condition_4 == 'true' }}
76
+ BUILD : ${{ steps.build_conditionals.outputs.build_condition_1 == 'true' || steps.build_conditionals.outputs.build_condition_2 == 'true' || steps.build_conditionals.outputs.build_condition_3 == 'true' }}
77
77
78
78
runs-on : " ubuntu-latest"
79
79
steps :
@@ -159,10 +159,12 @@ jobs:
159
159
id : build_conditionals
160
160
run : |
161
161
set -euo pipefail
162
+ # always build if the workflow is manually triggered with --build flag
162
163
echo "build_condition_1=${{ github.event.inputs.build }}" >> $GITHUB_OUTPUT
164
+ # build if the workflow is manually triggered and the deployment doesn't exist
163
165
echo "build_condition_2=${{ github.event_name == 'workflow_dispatch' && steps.check_deployment.outputs.NEW == 'true' }}" >> $GITHUB_OUTPUT
164
- echo "build_condition_3=${{ github.event_name == 'push' && steps.check_deployment.outputs.NEW == 'false' && steps.filter.outputs.all_count > steps.filter.outputs.ignored_count }}" >> $GITHUB_OUTPUT
165
- echo "build_condition_4 =${{ steps.check_deployment.outputs.NEW == 'false' && steps.filter.outputs.all_count > steps.filter.outputs.ignored_count }}" >> $GITHUB_OUTPUT
166
+ # build if the deployment alreday exist and there are changes in the files that we care about (this case covers PR updates)
167
+ echo "build_condition_3 =${{ steps.check_deployment.outputs.NEW == 'false' && steps.filter.outputs.all_count > steps.filter.outputs.ignored_count }}" >> $GITHUB_OUTPUT
166
168
167
169
comment-pr :
168
170
needs : [check_pr, get_info]
You can’t perform that action at this time.
0 commit comments