Skip to content

Commit 9ba5f76

Browse files
feat: add registry type
1 parent 9fc8ed6 commit 9ba5f76

File tree

6 files changed

+21
-5
lines changed

6 files changed

+21
-5
lines changed

.github/actions/build-push-image/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ inputs:
99
aws_region:
1010
description: "aws region to use"
1111
required: true
12+
registry_type:
13+
description: "type of registry (public|private)"
14+
required: false
15+
default: "private"
1216
ecr_registry:
1317
description: "registry where to push the image"
1418
required: true
@@ -38,6 +42,7 @@ runs:
3842
with:
3943
role-to-assume: ${{ inputs.aws_role }}
4044
aws-region: ${{ inputs.aws_region }}
45+
registry-type: ${{ inputs.registry_type }}
4146
- name: Login to Amazon ECR
4247
id: login-ecr
4348
uses: aws-actions/[email protected]

.github/actions/get-ecr-scan-result/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ inputs:
99
aws_region:
1010
description: "aws region to use"
1111
required: true
12+
registry_type:
13+
description: "type of registry (public|private)"
14+
required: false
15+
default: "private"
1216
ecr_registry:
1317
description: "registry where to push the image"
1418
required: true
@@ -47,6 +51,7 @@ runs:
4751
with:
4852
role-to-assume: ${{ inputs.aws_role }}
4953
aws-region: ${{ inputs.aws_region }}
54+
registry-type: ${{ inputs.registry_type }}
5055
- name: Login to Amazon ECR
5156
id: login-ecr
5257
uses: aws-actions/[email protected]

.github/actions/retag-image/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ inputs:
99
aws_region:
1010
description: "aws region to use"
1111
required: true
12+
registry_type:
13+
description: "type of registry (public|private)"
14+
required: false
15+
default: "private"
1216
ecr_repositories:
1317
description: "ecr repositories (name only) - seperated with ,"
1418
required: true
@@ -27,6 +31,7 @@ runs:
2731
with:
2832
role-to-assume: ${{ inputs.aws_role }}
2933
aws-region: ${{ inputs.aws_region }}
34+
registry-type: ${{ inputs.registry_type }}
3035
- name: Login to Amazon ECR
3136
id: login-ecr
3237
uses: aws-actions/[email protected]

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ concurrency:
3333
cancel-in-progress: true
3434

3535
env:
36-
WORKFLOW_BRANCH: "main"
36+
WORKFLOW_BRANCH: "feat-add-registry-type"
3737

3838
permissions:
3939
contents: read
@@ -108,6 +108,7 @@ jobs:
108108
source_images: ${{ fromJson(steps.get-customer.outputs.result).source_images }}
109109
destination_aws_role: ${{ steps.get-aws-image-config.outputs.aws_role }}
110110
destination_aws_region: ${{ steps.get-aws-image-config.outputs.aws_region }}
111+
destination_registry_type: ${{ steps.get-aws-image-config.outputs.registry_type }}
111112
destination_aws_access_key_id: ${{ steps.get-aws-image-config.outputs.aws_access_key_id }}
112113
destination_aws_secret_access_key: ${{ steps.get-aws-image-config.outputs.aws_secret_access_key }}
113114
destination_images: ${{ fromJson(steps.get-customer.outputs.result).destination_images }}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828
cancel-in-progress: true
2929

3030
env:
31-
WORKFLOW_BRANCH: "main"
31+
WORKFLOW_BRANCH: "feat-add-registry-type"
3232

3333
permissions:
3434
contents: read
@@ -106,6 +106,6 @@ jobs:
106106
repo: "infrastructure-k8s"
107107
github_token: ${{ secrets.DATAVISYN_BOT_REPO_TOKEN }}
108108
workflow_file_name: "push-docker-artifact-to-customer.yml"
109-
ref: "main"
109+
ref: "feat-add-registry-type"
110110
github_user: ${{ secrets.DV_BOT_USER }}
111111
client_payload: ${{ toJson(matrix.customer) }}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ concurrency:
4646
cancel-in-progress: true
4747

4848
env:
49-
WORKFLOW_BRANCH: "main"
49+
WORKFLOW_BRANCH: "feat-add-registry-type"
5050
DATAVISYN_PYTHON_BASE_IMAGE: "188237246440.dkr.ecr.eu-central-1.amazonaws.com/datavisyn/base/python:main"
5151
DATAVISYN_NGINX_BASE_IMAGE: "188237246440.dkr.ecr.eu-central-1.amazonaws.com/datavisyn/base/nginx:main"
5252

@@ -453,7 +453,7 @@ jobs:
453453
# if? When should we do this? Always? Only for certain branches? If so, how should we define that, in the config.json?
454454
# We need the always() && !cancelled() && !failure() because the test-images may have been skipped (which is fine), but this transitvely propagates through retag-images to here. See https://github.com/actions/runner/issues/491#issuecomment-1507495166
455455
if: ${{ always() && !cancelled() && !failure() && fromJson(needs.get-flavors.outputs.result).skip_push != true && fromJson(needs.get-flavors.outputs.result).push_to != '' }}
456-
uses: datavisyn/github-workflows/.github/workflows/build-docker-artifacts-trigger-push.yml@main
456+
uses: datavisyn/github-workflows/.github/workflows/build-docker-artifacts-trigger-push.yml@feat-add-registry-type
457457
secrets: inherit
458458
with:
459459
push_to: ${{ fromJson(needs.get-flavors.outputs.result).push_to }}

0 commit comments

Comments
 (0)