File tree 4 files changed +41
-3
lines changed
4 files changed +41
-3
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,9 @@ jobs:
176
176
177
177
- name : Sync Readme to Dockerhub
178
178
run : make sync-readme-to-dockerhub
179
+
180
+ - name : Sync Readme to ECR Public
181
+ run : make sync-readme-to-ecr-public
179
182
180
183
- name : Create NTH README Update PR
181
184
run : make create-release-prep-pr-readme
Original file line number Diff line number Diff line change @@ -120,6 +120,10 @@ generate-k8s-yaml:
120
120
sync-readme-to-dockerhub :
121
121
${MAKEFILE_PATH} /scripts/sync-readme-to-dockerhub
122
122
123
+ sync-readme-to-ecr-public :
124
+ @ECR_REGISTRY=${ECR_REGISTRY} ${MAKEFILE_PATH} /scripts/ecr-public-login
125
+ ${MAKEFILE_PATH} /scripts/sync-readme-to-ecr-public
126
+
123
127
ekscharts-sync :
124
128
${MAKEFILE_PATH} /scripts/sync-to-aws-eks-charts -b ${BINARY_NAME} -r ${REPO_FULL_NAME}
125
129
Original file line number Diff line number Diff line change 15
15
<a href =" https://goreportcard.com/report/github.com/aws/aws-node-termination-handler " >
16
16
<img src="https://goreportcard.com/badge/github.com/aws/aws-node-termination-handler" alt="go-report-card">
17
17
</a >
18
- <a href =" https://travis-ci.org/aws/aws-node-termination-handler " >
19
- <img src="https://travis-ci.org/aws/aws-node-termination-handler.svg?branch=main" alt="build-status">
20
- </a >
21
18
<a href =" https://codecov.io/gh/aws/aws-node-termination-handler " >
22
19
<img src="https://img.shields.io/codecov/c/github/aws/aws-node-termination-handler" alt="build-status">
23
20
</a >
26
23
</a >
27
24
</p >
28
25
26
+ ![ NTH Continuous Integration and Release] ( https://github.com/aws/aws-node-termination-handler/workflows/NTH%20Continuous%20Integration%20and%20Release/badge.svg )
27
+
29
28
<div >
30
29
<hr >
31
30
</div >
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -euo pipefail
3
+
4
+ SCRIPTPATH=" $( cd " $( dirname " $0 " ) " ; pwd -P ) "
5
+ REPO_NAME=" aws-node-termination-handler"
6
+ # about and usage section char max
7
+ MAX_CHAR_COUNT=10240
8
+ USAGE_TEXT=" See About section"
9
+ ADDITIONAL_MSG=" ...
10
+
11
+ **truncated due to char limits**...
12
+ A complete version of the ReadMe can be found [here](https://github.com/aws/aws-node-termination-handler#aws-node-termination-handler)\" "
13
+
14
+
15
+ if git --no-pager diff --name-only HEAD^ HEAD | grep ' README.md' ; then
16
+ # converting to json to insert esc chars, then replace newlines for proper markdown render
17
+ raw_about=$( jq -n --arg msg " $( < $SCRIPTPATH /../README.md) " ' {"usageText": $msg}' | jq ' .usageText' | sed ' s/\\n/\
18
+ /g' )
19
+ char_to_trunc=" $(( $MAX_CHAR_COUNT - ${# ADDITIONAL_MSG} )) "
20
+ raw_truncated=" ${raw_about: 0: $char_to_trunc } "
21
+ raw_truncated+=" $ADDITIONAL_MSG "
22
+ resp=$( aws ecr-public put-repository-catalog-data --repository-name=" ${REPO_NAME} " --catalog-data aboutText=" ${raw_truncated} " ,usageText=" ${USAGE_TEXT} " --region us-east-1)
23
+
24
+ if [[ $resp -ge 1 ]]; then
25
+ echo " README sync to ecr-public failed"
26
+ exit 1
27
+ else
28
+ echo " README sync to ecr-public succeeded!"
29
+ fi
30
+ else
31
+ echo " README.md did not change in the last commit. Not taking any action."
32
+ fi
You can’t perform that action at this time.
0 commit comments