@@ -37,10 +37,6 @@ permissions:
37
37
packages : write
38
38
pull-requests : write # needed for commenting on PRs
39
39
40
- concurrency :
41
- group : ${{ github.workflow }}-${{ github.ref }}
42
- cancel-in-progress : true
43
-
44
40
jobs :
45
41
check_pr :
46
42
runs-on : ubuntu-latest
73
69
CODER_BASE_IMAGE_TAG : ${{ steps.set_tags.outputs.CODER_BASE_IMAGE_TAG }}
74
70
CODER_IMAGE_TAG : ${{ steps.set_tags.outputs.CODER_IMAGE_TAG }}
75
71
NEW : ${{ steps.check_deployment.outputs.NEW }}
76
- BUILD : ${{ steps.build_conditionals.outputs.first_or_force_build || steps.build_conditionals.outputs.automatic_rebuild }}
72
+ BUILD : ${{ steps.build_conditionals.outputs.first_or_force_build == 'true' || steps.build_conditionals.outputs.automatic_rebuild == 'true' }}
77
73
78
74
runs-on : " ubuntu-latest"
79
75
steps :
@@ -166,7 +162,7 @@ jobs:
166
162
echo "automatic_rebuild=${{ steps.check_deployment.outputs.NEW == 'false' && steps.filter.outputs.all_count > steps.filter.outputs.ignored_count }}" >> $GITHUB_OUTPUT
167
163
168
164
comment-pr :
169
- needs : [check_pr, get_info]
165
+ needs : get_info
170
166
if : needs.get_info.outputs.BUILD == 'true' || github.event.inputs.deploy == 'true'
171
167
runs-on : " ubuntu-latest"
172
168
steps :
@@ -198,6 +194,10 @@ jobs:
198
194
# Run build job only if there are changes in the files that we care about or if the workflow is manually triggered with --build flag
199
195
if : needs.get_info.outputs.BUILD == 'true'
200
196
runs-on : ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
197
+ # This concurrency only cancels build jobs if a new build is triggred. It will avoid cancelling the current deployemtn in case of docs chnages.
198
+ concurrency :
199
+ group : build-${{ github.workflow }}-${{ github.ref }}-${{ needs.get_info.outputs.BUILD }}
200
+ cancel-in-progress : true
201
201
env :
202
202
DOCKER_CLI_EXPERIMENTAL : " enabled"
203
203
CODER_IMAGE_TAG : ${{ needs.get_info.outputs.CODER_IMAGE_TAG }}
0 commit comments