Skip to content

Commit e1ec2b0

Browse files
Merge remote-tracking branch 'origin/main' into fe/feature/RI-6265_update-list-of-databases
2 parents 6030dcb + 9bf02b6 commit e1ec2b0

31 files changed

+630
-227
lines changed

.github/workflows/aws.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
workflow_call:
55

66
env:
7-
# TODO: remove after release
87
# AWS_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME }}
98
AWS_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME_TEST }}
109
AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }}
@@ -52,6 +51,12 @@ jobs:
5251
5352
aws s3 cp release/ s3://${AWS_BUCKET_NAME}/private/${applicationVersion} --recursive
5453
54+
# Remove artifacts from github actions
55+
remove-artifacts:
56+
name: Remove artifacts
57+
uses: ./.github/workflows/remove-artifacts.yml
58+
needs: 'release-private'
59+
5560
release-public:
5661
name: Release s3 public
5762
runs-on: ubuntu-latest

.github/workflows/build.yml

Lines changed: 78 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,74 +2,127 @@ name: 🚀 Build
22

33
on:
44
# Manual trigger build
5+
# No multi-select
6+
# https://github.com/actions/runner/issues/2076
57
workflow_dispatch:
68
inputs:
7-
target:
8-
description: Build target
9+
build_docker:
10+
description: Build Docker
11+
type: boolean
12+
required: false
13+
14+
build_windows_x64:
15+
description: Build Windows x64
16+
type: boolean
17+
required: false
18+
19+
build_macos_x64:
20+
description: Build macOS x64
21+
type: boolean
22+
required: false
23+
24+
build_macos_arm64:
25+
description: Build macOS arm64
26+
type: boolean
27+
required: false
28+
29+
build_linux_appimage_x64:
30+
description: Build Linux AppImage x64
31+
type: boolean
32+
required: false
33+
34+
build_linux_deb_x64:
35+
description: Build Linux DEB x64
36+
type: boolean
37+
required: false
38+
39+
build_linux_rpm_x64:
40+
description: Build Linux RPM x64
41+
type: boolean
42+
required: false
43+
44+
build_linux_snap_x64:
45+
description: Build Linux Snap x64
46+
type: boolean
947
required: false
10-
default: 'all'
11-
type: choice
12-
options:
13-
- all
14-
- docker
15-
- windows:x64
16-
- macos:x64
17-
- macos:arm64
18-
- macos:all
19-
- linux:appimage:x64
20-
- linux:deb:x64
21-
- linux:rpm:x64
22-
- linux:snap:x64
23-
- linux:all
2448

2549
environment:
2650
description: Environment to run build
2751
type: environment
2852
default: 'staging'
2953
required: false
3054

55+
debug:
56+
description: Enable SSH Debug
57+
type: boolean
58+
3159
# Called for Release workflows
3260
workflow_call:
3361
inputs:
3462
environment:
3563
description: Environment to run build
3664
type: string
3765
default: 'staging'
38-
required: false
66+
3967
target:
4068
description: Build target
4169
type: string
4270
default: 'all'
43-
required: false
71+
72+
# Cancel a previous same workflow
73+
concurrency:
74+
group: ${{ github.workflow }}-${{ github.ref }}
75+
cancel-in-progress: true
4476

4577
jobs:
78+
get-selected:
79+
runs-on: ubuntu-latest
80+
outputs: # Set this to consume the output on other job
81+
selected: ${{ steps.get-selected.outputs.selected}}
82+
steps:
83+
- uses: actions/checkout@v4
84+
85+
- id: get-selected
86+
uses: joao-zanutto/[email protected]
87+
with:
88+
format: 'list'
89+
90+
- run: echo ${{ steps.get-selected.outputs.selected }}
91+
4692
build-linux:
47-
if: startsWith(inputs.target, 'linux') || endsWith(inputs.target, 'all')
48-
# concurrency: build
93+
needs: get-selected
94+
if: contains(needs.get-selected.outputs.selected, 'linux') || inputs.target == 'all'
4995
uses: ./.github/workflows/pipeline-build-linux.yml
5096
secrets: inherit
5197
with:
5298
environment: ${{ inputs.environment }}
53-
target: ${{ (endsWith(inputs.target, 'all') && 'all') || inputs.target }}
99+
target: ${{ inputs.target || needs.get-selected.outputs.selected }}
100+
debug: ${{ inputs.debug }}
54101

55102
build-macos:
56-
if: startsWith(inputs.target, 'macos') || endsWith(inputs.target, 'all')
103+
needs: get-selected
104+
if: contains(needs.get-selected.outputs.selected, 'macos') || inputs.target == 'all'
57105
uses: ./.github/workflows/pipeline-build-macos.yml
58106
secrets: inherit
59107
with:
60108
environment: ${{ inputs.environment }}
61-
target: ${{ (endsWith(inputs.target, 'all') && 'all') || inputs.target }}
109+
target: ${{ inputs.target || needs.get-selected.outputs.selected }}
110+
debug: ${{ inputs.debug }}
62111

63112
build-windows:
64-
if: startsWith(inputs.target, 'windows') || endsWith(inputs.target, 'all')
113+
needs: get-selected
114+
if: contains(needs.get-selected.outputs.selected, 'windows') || inputs.target == 'all'
65115
uses: ./.github/workflows/pipeline-build-windows.yml
66116
secrets: inherit
67117
with:
68118
environment: ${{ inputs.environment }}
119+
debug: ${{ inputs.debug }}
69120

70121
build-docker:
71-
if: startsWith(inputs.target, 'docker') || endsWith(inputs.target, 'all')
122+
needs: get-selected
123+
if: contains(needs.get-selected.outputs.selected, 'docker') || inputs.target == 'all'
72124
uses: ./.github/workflows/pipeline-build-docker.yml
73125
secrets: inherit
74126
with:
75127
environment: ${{ inputs.environment }}
128+
debug: ${{ inputs.debug }}

.github/workflows/deploy-pages.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy pages
2+
on:
3+
workflow_call:
4+
inputs:
5+
group:
6+
description: Group matching the artifacts
7+
type: string
8+
default: '*'
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/download-artifact@v4
20+
with:
21+
pattern: ${{ format('{0}*', inputs.group) }}
22+
path: public/${{ github.run_id }}
23+
24+
- name: Deploy 🚀
25+
uses: JamesIves/github-pages-deploy-action@v4
26+
with:
27+
folder: public
28+
clean: false

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ on:
44
inputs:
55
environment:
66
description: Environment for build
7-
required: false
87
default: 'staging'
98
type: string
9+
1010
only_docker:
1111
description: Build only docker
12-
required: false
12+
default: false
13+
type: boolean
14+
15+
debug:
16+
description: SSH Debug
1317
default: false
1418
type: boolean
1519

@@ -21,6 +25,13 @@ jobs:
2125
steps:
2226
- uses: actions/checkout@v4
2327

28+
# SSH Debug
29+
- name: Enable SSH
30+
uses: mxschmitt/action-tmate@v3
31+
if: inputs.debug
32+
with:
33+
detached: true
34+
2435
- name: Set up QEMU
2536
uses: docker/setup-qemu-action@v3
2637

.github/workflows/pipeline-build-linux.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@ on:
1515
default: 'all'
1616
type: string
1717

18+
debug:
19+
description: SSH Debug
20+
default: false
21+
type: boolean
22+
1823
jobs:
1924
build:
2025
name: Build linux
2126
runs-on: ubuntu-24.04
2227
environment: ${{ inputs.environment }}
2328

2429
steps:
25-
#TODO: some debug tools
26-
# - uses: crazy-max/ghaction-dump-context@v2
27-
# - uses: hmarr/debug-action@v3
28-
# ssh
29-
# - run: sudo apt-get update -qy && sudo apt-get install -qy tmux;
30-
# - name: Setup upterm session
31-
# - uses: mxschmitt/action-tmate@v3 #1 better
32-
# uses: lhotari/action-upterm@v1 #2
33-
# with:
34-
# limit-access-to-actor: true
35-
# limit-access-to-users: zalenskiSofteq
36-
3730
- uses: actions/checkout@v4
3831

32+
# SSH Debug
33+
- name: Enable SSH
34+
uses: mxschmitt/action-tmate@v3
35+
if: inputs.debug
36+
with:
37+
detached: true
38+
3939
- name: Install all libs and dependencies
4040
uses: ./.github/actions/install-all-build-libs
4141
with:

.github/workflows/pipeline-build-macos.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
default: 'all'
1515
type: string
1616

17+
debug:
18+
description: SSH Debug
19+
default: false
20+
type: boolean
21+
1722
jobs:
1823
build:
1924
name: Build macos
@@ -22,6 +27,13 @@ jobs:
2227
steps:
2328
- uses: actions/checkout@v4
2429

30+
# SSH Debug
31+
- name: Enable SSH
32+
uses: mxschmitt/action-tmate@v3
33+
if: inputs.debug
34+
with:
35+
detached: true
36+
2537
- name: Add certificates to the keychain
2638
uses: ./.github/actions/install-apple-certs
2739
with:

.github/workflows/pipeline-build-windows.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ on:
44
inputs:
55
environment:
66
description: Environment for build
7-
required: false
87
default: 'staging'
98
type: string
109

10+
debug:
11+
description: SSH Debug
12+
default: false
13+
type: boolean
14+
1115
jobs:
1216
build:
1317
name: Build windows
@@ -17,6 +21,13 @@ jobs:
1721
steps:
1822
- uses: actions/checkout@v4
1923

24+
# SSH Debug
25+
- name: Enable SSH
26+
uses: mxschmitt/action-tmate@v3
27+
if: inputs.debug
28+
with:
29+
detached: true
30+
2031
- name: Install all libs and dependencies
2132
uses: ./.github/actions/install-all-build-libs
2233

.github/workflows/release-prod.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,8 @@ jobs:
5454
uses: ./.github/workflows/release-docker.yml
5555
needs: aws-prod
5656
secrets: inherit
57+
58+
# Cancel a previous run workflow
59+
concurrency:
60+
group: ${{ github.workflow }}-${{ github.ref }}
61+
cancel-in-progress: true

.github/workflows/release-stage.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
uses: ./.github/workflows/tests-e2e-appimage.yml
3434
secrets: inherit
3535

36-
37-
38-
36+
# Cancel a previous run workflow
37+
concurrency:
38+
group: ${{ github.workflow }}-${{ github.ref }}
39+
cancel-in-progress: true
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Remove artifacts
2+
on:
3+
workflow_call:
4+
inputs:
5+
pattern:
6+
description: Glob pattern matching the artifacts
7+
type: string
8+
default: '*'
9+
10+
jobs:
11+
remove-artifacts:
12+
name: Remove artifacts
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# - uses: actions/checkout@v4
17+
18+
- name: Merge artifacts by pattern
19+
id: merge-artifacts
20+
uses: actions/upload-artifact/merge@v4
21+
with:
22+
name: remove-artifacts
23+
pattern: ${{ inputs.pattern || '*'}}
24+
delete-merged: true
25+
26+
- name: Delete merged artifact
27+
uses: actions/github-script@v7
28+
with:
29+
script: |
30+
github.rest.actions.deleteArtifact({
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
artifact_id: ${{ steps.merge-artifacts.outputs.artifact-id }}
34+
});
35+

0 commit comments

Comments
 (0)