File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed
Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 22
33set -e
44
5- if ! echo " $1 " | grep -q " ^http" ; then
6- IMAGE_REPOSITORY_URL=" https://$1 "
7- else
8- IMAGE_REPOSITORY_URL=" $1 "
9- fi
10- BEARER_TOKEN=$2
11- INITIAL_NUMBER=${3}
12- TAG_PREFIX=${4}
5+ REPOSITORY_API_URL=$1
6+ IMAGE_NAME=$2
7+ BEARER_TOKEN=$3
8+ INITIAL_NUMBER=$4
9+ TAG_PREFIX=$5
1310
1411if [ -n " $BEARER_TOKEN " ]; then
1512 AUTH_HEADER=" -H \" Authorization: Bearer ${BEARER_TOKEN} \" "
1613else
1714 AUTH_HEADER=" "
1815fi
1916
20- TAGS_LIST_JSON=$( curl -fs $AUTH_HEADER " ${IMAGE_REPOSITORY_URL } /tags/list" )
17+ TAGS_LIST_JSON=$( curl -fs $AUTH_HEADER " ${REPOSITORY_API_URL} / ${IMAGE_NAME } /tags/list" )
2118TAGS=$( echo " $TAGS_LIST_JSON " | jq -r ' .tags[]' || echo " " )
2219
2320if [ -z " $TAGS " ]; then
Original file line number Diff line number Diff line change @@ -2,11 +2,14 @@ name: Next Image Tag Number
22description : Get the next tag number for an image in an OCI repository.
33
44inputs :
5- image_repository_url :
6- description : The URL of the OCI-compatible image repository.
5+ repository_api_url :
6+ description : The full URL of the OCI-compatible repository API.
7+ required : true
8+ image :
9+ description : The name of the image within the specified repository.
710 required : true
811 bearer_token :
9- description : Optional bearer token for repository authentication.
12+ description : Optional bearer token for authentication.
1013 required : false
1114 initial_number :
1215 description : Starting tag number if no tags exist.
2730 using : docker
2831 image : Dockerfile
2932 args :
30- - ${{ inputs.image_repository_url }}
33+ - ${{ inputs.repository_api_url }}
34+ - ${{ inputs.image }}
3135 - ${{ inputs.bearer_token }}
3236 - ${{ inputs.initial_number }}
3337 - ${{ inputs.tag_prefix }}
You can’t perform that action at this time.
0 commit comments