Skip to content

Commit 201a6c0

Browse files
authored
chore: remove extra condition from pr-deploy.yaml (coder#9788)
1 parent 801c6c9 commit 201a6c0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/pr-deploy.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ permissions:
3737
packages: write
3838
pull-requests: write # needed for commenting on PRs
3939

40-
concurrency:
41-
group: ${{ github.workflow }}-${{ github.ref }}
42-
cancel-in-progress: true
43-
4440
jobs:
4541
check_pr:
4642
runs-on: ubuntu-latest
@@ -73,7 +69,7 @@ jobs:
7369
CODER_BASE_IMAGE_TAG: ${{ steps.set_tags.outputs.CODER_BASE_IMAGE_TAG }}
7470
CODER_IMAGE_TAG: ${{ steps.set_tags.outputs.CODER_IMAGE_TAG }}
7571
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' }}
7773

7874
runs-on: "ubuntu-latest"
7975
steps:
@@ -166,7 +162,7 @@ jobs:
166162
echo "automatic_rebuild=${{ steps.check_deployment.outputs.NEW == 'false' && steps.filter.outputs.all_count > steps.filter.outputs.ignored_count }}" >> $GITHUB_OUTPUT
167163
168164
comment-pr:
169-
needs: [check_pr, get_info]
165+
needs: get_info
170166
if: needs.get_info.outputs.BUILD == 'true' || github.event.inputs.deploy == 'true'
171167
runs-on: "ubuntu-latest"
172168
steps:
@@ -198,6 +194,10 @@ jobs:
198194
# 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
199195
if: needs.get_info.outputs.BUILD == 'true'
200196
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
201201
env:
202202
DOCKER_CLI_EXPERIMENTAL: "enabled"
203203
CODER_IMAGE_TAG: ${{ needs.get_info.outputs.CODER_IMAGE_TAG }}

0 commit comments

Comments
 (0)