Skip to content

Commit 6dbfe92

Browse files
ci(common): reduce docker build frequency (#1448)
1 parent a92b899 commit 6dbfe92

15 files changed

+77
-203
lines changed

.github/workflows/coprocessor-db-migration-docker-build.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ on:
1313
required: true
1414
CGR_PASSWORD:
1515
required: true
16-
inputs:
17-
is_workflow_call:
18-
description: 'To determine if the trigger was a workflow_call or a pull request'
19-
type: boolean
20-
required: false
21-
default: true
2216
outputs:
2317
build_result:
2418
description: "Result of the build job of this workflow"
2519
value: ${{ jobs.build.result }}
26-
pull_request:
27-
push:
28-
branches:
29-
- main
3020
release:
3121
types:
3222
- published
23+
workflow_dispatch:
3324

3425
permissions: {}
3526

@@ -44,9 +35,6 @@ jobs:
4435
contents: 'read' # Required to checkout repository code
4536
pull-requests: 'read' # Required to read pull request information
4637
runs-on: ubuntu-latest
47-
if: |
48-
inputs.is_workflow_call ||
49-
(!inputs.is_workflow_call && !startsWith(github.head_ref, 'mergify/merge-queue/'))
5038
outputs:
5139
changes-coprocessor-db-migration: ${{ steps.filter.outputs.coprocessor-db-migration }}
5240
steps:
@@ -63,7 +51,10 @@ jobs:
6351
6452
build:
6553
needs: check-changes
66-
if: ${{ needs.check-changes.outputs.changes-coprocessor-db-migration == 'true' || github.event_name == 'release' }}
54+
if: |
55+
needs.check-changes.outputs.changes-coprocessor-db-migration == 'true'
56+
|| github.event_name == 'release'
57+
|| github.event_name == 'workflow_dispatch'
6758
uses: zama-ai/ci-templates/.github/workflows/common-docker.yml@6c72e3dbc894744c1e228fb165f4c4d657e475b6 # v1.0.1
6859
secrets:
6960
AWS_ACCESS_KEY_S3_USER: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}

.github/workflows/coprocessor-gw-listener-docker-build.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ on:
1313
required: true
1414
CGR_PASSWORD:
1515
required: true
16-
inputs:
17-
is_workflow_call:
18-
description: 'To determine if the trigger was a workflow_call or a pull request'
19-
type: boolean
20-
required: false
21-
default: true
2216
outputs:
2317
build_result:
2418
description: "Result of the build job of this workflow"
2519
value: ${{ jobs.build.result }}
26-
pull_request:
27-
push:
28-
branches:
29-
- main
3020
release:
3121
types:
3222
- published
23+
workflow_dispatch:
3324

3425
permissions: {}
3526

@@ -44,9 +35,6 @@ jobs:
4435
contents: 'read' # Required to checkout repository code
4536
pull-requests: 'read' # Required to read pull request information
4637
runs-on: ubuntu-latest
47-
if: |
48-
inputs.is_workflow_call ||
49-
(!inputs.is_workflow_call && !startsWith(github.head_ref, 'mergify/merge-queue/'))
5038
outputs:
5139
changes-coprocessor-gw-listener: ${{ steps.filter.outputs.coprocessor-gw-listener }}
5240
steps:
@@ -65,7 +53,10 @@ jobs:
6553
6654
build:
6755
needs: check-changes
68-
if: ${{ needs.check-changes.outputs.changes-coprocessor-gw-listener == 'true' || github.event_name == 'release' }}
56+
if: |
57+
needs.check-changes.outputs.changes-coprocessor-gw-listener == 'true'
58+
|| github.event_name == 'release'
59+
|| github.event_name == 'workflow_dispatch'
6960
uses: zama-ai/ci-templates/.github/workflows/common-docker.yml@6c72e3dbc894744c1e228fb165f4c4d657e475b6 # v1.0.1
7061
secrets:
7162
AWS_ACCESS_KEY_S3_USER: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}

.github/workflows/coprocessor-host-listener-docker-build.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ on:
1313
required: true
1414
CGR_PASSWORD:
1515
required: true
16-
inputs:
17-
is_workflow_call:
18-
description: 'To determine if the trigger was a workflow_call or a pull request'
19-
type: boolean
20-
required: false
21-
default: true
2216
outputs:
2317
build_result:
2418
description: "Result of the build job of this workflow"
2519
value: ${{ jobs.build.result }}
26-
pull_request:
27-
push:
28-
branches:
29-
- main
3020
release:
3121
types:
3222
- published
23+
workflow_dispatch:
3324

3425
permissions: {}
3526

@@ -44,9 +35,6 @@ jobs:
4435
contents: 'read' # Required to checkout repository code
4536
pull-requests: 'read' # Required to read pull request information
4637
runs-on: ubuntu-latest
47-
if: |
48-
inputs.is_workflow_call ||
49-
(!inputs.is_workflow_call && !startsWith(github.head_ref, 'mergify/merge-queue/'))
5038
outputs:
5139
changes-coprocessor-host-listener: ${{ steps.filter.outputs.coprocessor-host-listener }}
5240
steps:
@@ -67,7 +55,10 @@ jobs:
6755
6856
build:
6957
needs: check-changes
70-
if: ${{ needs.check-changes.outputs.changes-coprocessor-host-listener == 'true' || github.event_name == 'release' }}
58+
if: |
59+
needs.check-changes.outputs.changes-coprocessor-host-listener == 'true'
60+
|| github.event_name == 'release'
61+
|| github.event_name == 'workflow_dispatch'
7162
uses: zama-ai/ci-templates/.github/workflows/common-docker.yml@6c72e3dbc894744c1e228fb165f4c4d657e475b6 # v1.0.1
7263
secrets:
7364
AWS_ACCESS_KEY_S3_USER: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}

.github/workflows/coprocessor-sns-worker-docker-build.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ on:
1313
required: true
1414
CGR_PASSWORD:
1515
required: true
16-
inputs:
17-
is_workflow_call:
18-
description: 'To determine if the trigger was a workflow_call or a pull request'
19-
type: boolean
20-
required: false
21-
default: true
2216
outputs:
2317
build_result:
2418
description: "Result of the build job of this workflow"
2519
value: ${{ jobs.build.result }}
26-
pull_request:
27-
push:
28-
branches:
29-
- main
3020
release:
3121
types:
3222
- published
23+
workflow_dispatch:
3324

3425
permissions: {}
3526

@@ -44,9 +35,6 @@ jobs:
4435
contents: 'read' # Required to checkout repository code
4536
pull-requests: 'read' # Required to read pull request information
4637
runs-on: ubuntu-latest
47-
if: |
48-
inputs.is_workflow_call ||
49-
(!inputs.is_workflow_call && !startsWith(github.head_ref, 'mergify/merge-queue/'))
5038
outputs:
5139
changes-coprocessor-sns-worker: ${{ steps.filter.outputs.coprocessor-sns-worker }}
5240
steps:
@@ -65,7 +53,10 @@ jobs:
6553
6654
build:
6755
needs: check-changes
68-
if: ${{ needs.check-changes.outputs.changes-coprocessor-sns-worker == 'true' || github.event_name == 'release' }}
56+
if: |
57+
needs.check-changes.outputs.changes-coprocessor-sns-worker == 'true'
58+
|| github.event_name == 'release'
59+
|| github.event_name == 'workflow_dispatch'
6960
uses: zama-ai/ci-templates/.github/workflows/common-docker.yml@6c72e3dbc894744c1e228fb165f4c4d657e475b6 # v1.0.1
7061
secrets:
7162
AWS_ACCESS_KEY_S3_USER: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}

.github/workflows/coprocessor-stress-test-tool-docker-build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
name: coprocessor-stress-test-tool-docker-build
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- main
84
release:
95
types:
106
- published
7+
workflow_dispatch:
118

129
permissions: {}
1310

@@ -40,7 +37,10 @@ jobs:
4037
4138
build:
4239
needs: check-changes
43-
if: ${{ needs.check-changes.outputs.changes-coprocessor-stress-test-tool == 'true' || github.event_name == 'release' }}
40+
if: |
41+
needs.check-changes.outputs.changes-coprocessor-stress-test-tool == 'true'
42+
|| github.event_name == 'release'
43+
|| github.event_name == 'workflow_dispatch'
4444
uses: zama-ai/ci-templates/.github/workflows/common-docker.yml@6c72e3dbc894744c1e228fb165f4c4d657e475b6 # v1.0.1
4545
secrets:
4646
AWS_ACCESS_KEY_S3_USER: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}

.github/workflows/coprocessor-tfhe-worker-docker-build.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ on:
1313
required: true
1414
CGR_PASSWORD:
1515
required: true
16-
inputs:
17-
is_workflow_call:
18-
description: 'To determine if the trigger was a workflow_call or a pull request'
19-
type: boolean
20-
required: false
21-
default: true
2216
outputs:
2317
build_result:
2418
description: "Result of the build job of this workflow"
2519
value: ${{ jobs.build.result }}
26-
pull_request:
27-
push:
28-
branches:
29-
- main
3020
release:
3121
types:
3222
- published
23+
workflow_dispatch:
3324

3425
permissions: {}
3526

@@ -44,9 +35,6 @@ jobs:
4435
contents: 'read' # Required to checkout repository code
4536
pull-requests: 'read' # Required to read pull request information
4637
runs-on: ubuntu-latest
47-
if: |
48-
inputs.is_workflow_call ||
49-
(!inputs.is_workflow_call && !startsWith(github.head_ref, 'mergify/merge-queue/'))
5038
outputs:
5139
changes-coprocessor-tfhe-worker: ${{ steps.filter.outputs.coprocessor-tfhe-worker }}
5240
steps:
@@ -65,7 +53,10 @@ jobs:
6553
6654
build:
6755
needs: check-changes
68-
if: ${{ needs.check-changes.outputs.changes-coprocessor-tfhe-worker == 'true' || github.event_name == 'release' }}
56+
if: |
57+
needs.check-changes.outputs.changes-coprocessor-tfhe-worker == 'true'
58+
|| github.event_name == 'release'
59+
|| github.event_name == 'workflow_dispatch'
6960
uses: zama-ai/ci-templates/.github/workflows/common-docker.yml@6c72e3dbc894744c1e228fb165f4c4d657e475b6 # v1.0.1
7061
secrets:
7162
AWS_ACCESS_KEY_S3_USER: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}

.github/workflows/coprocessor-tx-sender-docker-build.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ on:
1313
required: true
1414
CGR_PASSWORD:
1515
required: true
16-
inputs:
17-
is_workflow_call:
18-
description: 'To determine if the trigger was a workflow_call or a pull request'
19-
type: boolean
20-
required: false
21-
default: true
2216
outputs:
2317
build_result:
2418
description: "Result of the build job of this workflow"
2519
value: ${{ jobs.build.result }}
26-
pull_request:
27-
push:
28-
branches:
29-
- main
3020
release:
3121
types:
3222
- published
23+
workflow_dispatch:
3324

3425
permissions: {}
3526

@@ -44,9 +35,6 @@ jobs:
4435
contents: 'read' # Required to checkout repository code
4536
pull-requests: 'read' # Required to read pull request information
4637
runs-on: ubuntu-latest
47-
if: |
48-
inputs.is_workflow_call ||
49-
(!inputs.is_workflow_call && !startsWith(github.head_ref, 'mergify/merge-queue/'))
5038
outputs:
5139
changes-coprocessor-tx-sender: ${{ steps.filter.outputs.coprocessor-tx-sender }}
5240
steps:
@@ -64,7 +52,10 @@ jobs:
6452
- coprocessor/fhevm-engine/Cargo.lock
6553
build:
6654
needs: check-changes
67-
if: ${{ needs.check-changes.outputs.changes-coprocessor-tx-sender == 'true' || github.event_name == 'release' }}
55+
if: |
56+
needs.check-changes.outputs.changes-coprocessor-tx-sender == 'true'
57+
|| github.event_name == 'release'
58+
|| github.event_name == 'workflow_dispatch'
6859
uses: zama-ai/ci-templates/.github/workflows/common-docker.yml@6c72e3dbc894744c1e228fb165f4c4d657e475b6 # v1.0.1
6960
secrets:
7061
AWS_ACCESS_KEY_S3_USER: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}

.github/workflows/coprocessor-zkproof-worker-docker-build.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ on:
1313
required: true
1414
CGR_PASSWORD:
1515
required: true
16-
inputs:
17-
is_workflow_call:
18-
description: 'To determine if the trigger was a workflow_call or a pull request'
19-
type: boolean
20-
required: false
21-
default: true
2216
outputs:
2317
build_result:
2418
description: "Result of the build job of this workflow"
2519
value: ${{ jobs.build.result }}
26-
pull_request:
27-
push:
28-
branches:
29-
- main
3020
release:
3121
types:
3222
- published
23+
workflow_dispatch:
3324

3425
permissions: {}
3526

@@ -44,9 +35,6 @@ jobs:
4435
contents: 'read' # Required to checkout repository code
4536
pull-requests: 'read' # Required to read pull request information
4637
runs-on: ubuntu-latest
47-
if: |
48-
inputs.is_workflow_call ||
49-
(!inputs.is_workflow_call && !startsWith(github.head_ref, 'mergify/merge-queue/'))
5038
outputs:
5139
changes-coprocessor-zkproof-worker: ${{ steps.filter.outputs.coprocessor-zkproof-worker }}
5240
steps:
@@ -64,7 +52,10 @@ jobs:
6452
- coprocessor/fhevm-engine/Cargo.lock
6553
build:
6654
needs: check-changes
67-
if: ${{ needs.check-changes.outputs.changes-coprocessor-zkproof-worker == 'true' || github.event_name == 'release' }}
55+
if: |
56+
needs.check-changes.outputs.changes-coprocessor-zkproof-worker == 'true'
57+
|| github.event_name == 'release'
58+
|| github.event_name == 'workflow_dispatch'
6859
uses: zama-ai/ci-templates/.github/workflows/common-docker.yml@6c72e3dbc894744c1e228fb165f4c4d657e475b6 # v1.0.1
6960
secrets:
7061
AWS_ACCESS_KEY_S3_USER: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}

0 commit comments

Comments
 (0)