File tree Expand file tree Collapse file tree 5 files changed +29
-11
lines changed Expand file tree Collapse file tree 5 files changed +29
-11
lines changed Original file line number Diff line number Diff line change 4
4
command :
5
5
description : " Command to run inside the container"
6
6
required : true
7
+ ecr_registry :
8
+ description : " The ECR registry to use"
9
+ default : " 901841024863.dkr.ecr.us-east-1.amazonaws.com"
7
10
ecr_repository :
8
11
description : " The ECR repository to use"
9
12
default : release-infrastructure/garasign-git
@@ -12,13 +15,16 @@ runs:
12
15
using : composite
13
16
steps :
14
17
- name : " Run git command"
18
+ env :
19
+ ECR_REGISTRY : ${{ inputs.ecr_registry }}
20
+ ECR_REPOSITORY : ${{ inputs.ecr_repository }}
15
21
run : |
16
22
WORKING_DIR=/home/git-checkout
17
23
docker run \
18
24
--env-file=$GARASIGN_ENVFILE \
19
25
--rm \
20
26
-v $(pwd):$WORKING_DIR \
21
27
-w $WORKING_DIR \
22
- ${ECR_REGISTRY}/${{ inputs.ecr_repository } } \
28
+ ${ECR_REGISTRY}/${ECR_REPOSITORY } \
23
29
/bin/bash -c "git config --global --add safe.directory $WORKING_DIR && gpgloader && ${{ inputs.command }}"
24
30
shell : bash
Original file line number Diff line number Diff line change 4
4
filenames :
5
5
description : " File name(s) to sign, can be a glob pattern"
6
6
required : true
7
+ ecr_registry :
8
+ description : " The ECR registry to use"
9
+ default : " 901841024863.dkr.ecr.us-east-1.amazonaws.com"
7
10
ecr_repository :
8
11
description : " The ECR repository to use"
9
12
default : release-infrastructure/garasign-git
@@ -23,13 +26,16 @@ runs:
23
26
echo "names=\"$FILENAMES\"" >> $GITHUB_OUTPUT
24
27
- name : " Create detached signature for file"
25
28
shell : bash
29
+ env :
30
+ ECR_REGISTRY : ${{ inputs.ecr_registry }}
31
+ ECR_REPOSITORY : ${{ inputs.ecr_repository }}
26
32
run : |
27
33
docker run \
28
34
--env-file=$GARASIGN_ENVFILE \
29
35
--rm \
30
36
-v $(pwd):$(pwd) \
31
37
-w $(pwd) \
32
- ${ECR_REGISTRY}/${{ inputs.ecr_repository } } \
38
+ ${ECR_REGISTRY}/${ECR_REPOSITORY } \
33
39
/bin/bash -c 'gpgloader && for filename in ${{ inputs.filenames }}; do gpg --detach-sign --armor --output ${filename}.sig ${filename}; done'
34
40
35
41
- name : " Move the signature files to the release directory"
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ inputs:
10
10
kondukto_sub_project :
11
11
description : The Kondukto sub-project name (appended to the branch name)
12
12
required : false
13
+ ecr_registry :
14
+ description : " The ECR registry to use"
15
+ default : " 901841024863.dkr.ecr.us-east-1.amazonaws.com"
13
16
ecr_repository :
14
17
description : " The ECR repository to use"
15
18
default : release-infrastructure/silkbomb:2.0
22
25
env :
23
26
SBOM_IN_PATH : ${{ inputs.sbom_in_path }}
24
27
KONDUKTO_SUB_PROJECT : ${{ inputs.kondukto_sub_project }}
28
+ ECR_REGISTRY : ${{ inputs.ecr_registry }}
25
29
ECR_REPOSITORY : ${{ inputs.ecr_repository }}
26
30
SBOM_FILE_NAME : ${{ inputs.sbom_file_name }}
27
31
run : |
Original file line number Diff line number Diff line change @@ -10,9 +10,15 @@ inputs:
10
10
aws_secret_id :
11
11
description : " The name of the aws secret to use"
12
12
required : true
13
- ecr_registry :
14
- description : " The ECR registry to use"
13
+ ecr_registry_id :
14
+ description : " The ECR registry id to use"
15
15
default : " 901841024863"
16
+ ecr_role_arn :
17
+ description : " The ECR role arn to use"
18
+ default : " arn:aws:iam::901841024863:role/ecr-role-gha-ro"
19
+ ecr_region :
20
+ description : " The ECR region to use"
21
+ default : us-east-1
16
22
17
23
runs :
18
24
using : composite
@@ -38,10 +44,10 @@ runs:
38
44
- name : configure aws credentials for ECR
39
45
uses : aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4
40
46
with :
41
- role-to-assume : ${{ env.ECR_ROLE_ARN }}
47
+ role-to-assume : ${{ inputs.ecr_role_arn }}
42
48
role-session-name : release-session
43
- aws-region : ${{ env.ECR_REGION }}
49
+ aws-region : ${{ inputs.ecr_region }}
44
50
- name : Log in to ECR
45
51
uses : aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2
46
52
with :
47
- registries : " ${{ env.ECR_REGISTRY_ID }}"
53
+ registries : " ${{ inputs.ecr_registry_id }}"
Original file line number Diff line number Diff line change @@ -49,10 +49,6 @@ GPG_PUBLIC_URL=${GPG_PUBLIC_URL:-}
49
49
GARASIGN_ENVFILE=$GARASIGN_ENVFILE
50
50
SILKBOMB_ENVFILE=${SILKBOMB_ENVFILE:- }
51
51
KONDUKTO_ENVFILE=${KONDUKTO_ENVFILE:- }
52
- ECR_REGISTRY_ID=${ECR_REGISTRY_ID}
53
- ECR_REGISTRY=${ECR_REGISTRY_ID} .dkr.ecr.${ECR_REGION} .amazonaws.com
54
- ECR_ROLE_ARN=${ECR_ROLE_ARN}
55
- ECR_REGION=${ECR_REGION}
56
52
RELEASE_ASSETS=$RELEASE_ASSETS
57
53
S3_ASSETS=$S3_ASSETS
58
54
SECURITY_REPORT_URL=${SECURITY_REPORT_URL:- }
You can’t perform that action at this time.
0 commit comments