Skip to content

Commit a6fc591

Browse files
authored
Merge branch 'main' into copilot/fix-202
2 parents a48ec09 + 5f61b2d commit a6fc591

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
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: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ 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 }}
19+
skip_push:
20+
type: boolean
21+
required: false
22+
default: false
2123
fail_fast:
2224
type: boolean
2325
required: false
@@ -65,7 +67,7 @@ jobs:
6567
- name: Checkout repository
6668
uses: actions/checkout@v4
6769
with:
68-
ref: ${{ inputs.branch }}
70+
ref: ${{ inputs.branch || github.sha }}
6971
token: ${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
7072

7173
- name: Checkout github-workflows repository
@@ -166,7 +168,7 @@ jobs:
166168
- name: Checkout repository
167169
uses: actions/checkout@v4
168170
with:
169-
ref: ${{ inputs.branch }}
171+
ref: ${{ inputs.branch || github.sha }}
170172
token: ${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
171173
# This is required such that yarn install can access private repositories, i.e. visyn_pro
172174
# https://github.com/yarnpkg/yarn/issues/2614#issuecomment-2148174789
@@ -273,6 +275,7 @@ jobs:
273275
continue-on-error: false
274276

275277
- name: Push image
278+
if: ${{ inputs.skip_push != true }}
276279
# Instead of the docker/build-push-action@v6 which will rebuild the image, just push it directly
277280
run: docker push ${{ vars.DV_AWS_ECR_REGISTRY }}/${{ matrix.component.ecr_repository }}:${{ matrix.component.image_tag }}
278281

@@ -283,6 +286,7 @@ jobs:
283286
retag-images:
284287
name: Retag images of flavor ${{ matrix.flavor || 'default' }}
285288
needs: [get-flavors, build-flavors]
289+
if: ${{ inputs.skip_push != true }}
286290
strategy:
287291
fail-fast: false
288292
matrix:
@@ -294,7 +298,7 @@ jobs:
294298
- name: Checkout repository
295299
uses: actions/checkout@v4
296300
with:
297-
ref: ${{ inputs.branch }}
301+
ref: ${{ inputs.branch || github.sha }}
298302
token: ${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
299303

300304
- name: Checkout github-workflows repository
@@ -342,12 +346,12 @@ jobs:
342346
push-to-repositories:
343347
name: Push images to push targets
344348
# if? When should we do this? Always? Only for certain branches? If so, how should we define that, in the config.json?
345-
if: ${{ fromJson(needs.get-flavors.outputs.result).push_to != '' }}
349+
if: ${{ inputs.skip_push != true && fromJson(needs.get-flavors.outputs.result).push_to != '' }}
346350
needs: [retag-images, get-flavors]
347351
uses: datavisyn/github-workflows/.github/workflows/build-docker-artifacts-trigger-push.yml@main
348352
secrets: inherit
349353
with:
350354
push_to: ${{ fromJson(needs.get-flavors.outputs.result).push_to }}
351-
branch: ${{ inputs.branch }}
355+
branch: ${{ inputs.branch || github.sha }}
352356
# Do not run this on self-hosted, as it is faster and shouldn't be blocking anything
353357
# 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)