Skip to content

Commit 5f61b2d

Browse files
authored
fix: remove github sha from concurrency group to cancel commits on the same branch (#207)
1 parent 2740467 commit 5f61b2d

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

.github/workflows/build-docker-artifacts-trigger-push.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ on:
1111
branch:
1212
type: string
1313
required: false
14-
# When using github.ref || github.head_ref, it would contain the full path, including /, which breaks the postgres hostname
15-
default: ${{ github.sha }}
1614
runs_on:
1715
type: string
1816
required: false
@@ -47,7 +45,7 @@ jobs:
4745
- name: Checkout repository
4846
uses: actions/checkout@v4
4947
with:
50-
ref: ${{ inputs.branch }}
48+
ref: ${{ inputs.branch || github.sha }}
5149
token: ${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
5250

5351
- name: Checkout github-workflows repository

.github/workflows/build-docker-artifacts.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ on:
1616
branch:
1717
type: string
1818
required: false
19-
# When using github.ref || github.head_ref, it would contain the full path, including /, which breaks the postgres hostname
20-
default: ${{ github.sha }}
2119
skip_push:
2220
type: boolean
2321
required: false
@@ -69,7 +67,7 @@ jobs:
6967
- name: Checkout repository
7068
uses: actions/checkout@v4
7169
with:
72-
ref: ${{ inputs.branch }}
70+
ref: ${{ inputs.branch || github.sha }}
7371
token: ${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
7472

7573
- name: Checkout github-workflows repository
@@ -165,7 +163,7 @@ jobs:
165163
- name: Checkout repository
166164
uses: actions/checkout@v4
167165
with:
168-
ref: ${{ inputs.branch }}
166+
ref: ${{ inputs.branch || github.sha }}
169167
token: ${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
170168
# This is required such that yarn install can access private repositories, i.e. visyn_pro
171169
# https://github.com/yarnpkg/yarn/issues/2614#issuecomment-2148174789
@@ -294,7 +292,7 @@ jobs:
294292
- name: Checkout repository
295293
uses: actions/checkout@v4
296294
with:
297-
ref: ${{ inputs.branch }}
295+
ref: ${{ inputs.branch || github.sha }}
298296
token: ${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
299297

300298
- name: Checkout github-workflows repository
@@ -348,6 +346,6 @@ jobs:
348346
secrets: inherit
349347
with:
350348
push_to: ${{ fromJson(needs.get-flavors.outputs.result).push_to }}
351-
branch: ${{ inputs.branch }}
349+
branch: ${{ inputs.branch || github.sha }}
352350
# Do not run this on self-hosted, as it is faster and shouldn't be blocking anything
353351
# runs_on: ${{ inputs.runs_on || 'ubuntu-22.04' }}

.github/workflows/build-node-python.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66
branch:
77
type: string
88
required: false
9-
# When using github.ref || github.head_ref, it would contain the full path, including /, which breaks the postgres hostname
10-
default: ${{ github.sha }}
119
cypress_enable:
1210
description: "Global enable for cypress"
1311
type: boolean
@@ -132,7 +130,7 @@ jobs:
132130
- name: Checkout source repository
133131
uses: actions/checkout@v4
134132
with:
135-
ref: ${{ inputs.branch }}
133+
ref: ${{ inputs.branch || github.sha }}
136134
token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
137135
fetch-depth: ${{ inputs.chromatic_enable && '0' || '1' }}
138136
- name: Checkout github-workflows
@@ -172,7 +170,7 @@ jobs:
172170
- name: Checkout source repository
173171
uses: actions/checkout@v4
174172
with:
175-
ref: ${{ inputs.branch }}
173+
ref: ${{ inputs.branch || github.sha }}
176174
token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
177175
- name: Checkout github-workflows
178176
uses: actions/checkout@v4
@@ -263,7 +261,7 @@ jobs:
263261
- name: Checkout source repository
264262
uses: actions/checkout@v4
265263
with:
266-
ref: ${{ inputs.branch }}
264+
ref: ${{ inputs.branch || github.sha }}
267265
token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
268266
fetch-depth: ${{ inputs.chromatic_enable && '0' || '1' }}
269267
- name: Checkout github-workflows
@@ -405,7 +403,7 @@ jobs:
405403
- name: Checkout source repository
406404
uses: actions/checkout@v4
407405
with:
408-
ref: ${{ inputs.branch }}
406+
ref: ${{ inputs.branch || github.sha }}
409407
token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
410408
fetch-depth: ${{ inputs.chromatic_enable && '0' || '1' }}
411409
- name: Checkout github-workflows
@@ -447,13 +445,13 @@ jobs:
447445
uses: actions/upload-artifact@v4
448446
if: always()
449447
with:
450-
name: "bundles-${{ inputs.branch }}"
448+
name: "bundles-${{ inputs.branch || github.sha }}"
451449
path: bundles/
452450
- name: Upload playwright report
453451
uses: actions/upload-artifact@v4
454452
if: always()
455453
with:
456-
name: "playwright-report-${{ inputs.branch }}"
454+
name: "playwright-report-${{ inputs.branch || github.sha }}"
457455
path: playwright-report/
458456
- name: Run Chromatic Playwright
459457
if: ${{ inputs.chromatic_enable }}

0 commit comments

Comments
 (0)