File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
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' }}
76
+ BUILD : ${{ steps.build_conditionals.outputs.first_or_force_build || steps.build_conditionals.outputs.automatic_rebuild }}
77
77
78
78
runs-on : " ubuntu-latest"
79
79
steps :
@@ -159,12 +159,10 @@ 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
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
165
- echo "build_condition_2=${{ github.event_name == 'workflow_dispatch' && steps.check_deployment.outputs.NEW == 'true' }}" >> $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
162
+ # build if the workflow is manually triggered and the deployment doesn't exist (first build or force rebuild)
163
+ echo "first_or_force_build=${{ (github.event_name == 'workflow_dispatch' && steps.check_deployment.outputs.NEW == 'true') || github.event.inputs.build }}" >> $GITHUB_OUTPUT
164
+ # build if the deployment alreday exist and there are changes in the files that we care about (automatic updates)
165
+ echo "automatic_rebuild=${{ steps.check_deployment.outputs.NEW == 'false' && steps.filter.outputs.all_count > steps.filter.outputs.ignored_count }}" >> $GITHUB_OUTPUT
168
166
169
167
comment-pr :
170
168
needs : [check_pr, get_info]
You can’t perform that action at this time.
0 commit comments