This repository was archived by the owner on Sep 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ inputs:
13
13
docker_compose :
14
14
description : " docker-compose file to build and publish images from"
15
15
required : true
16
- repo_token :
16
+ repo_token :
17
17
description : " Github Repo token"
18
18
required : false
19
19
default : ' '
Original file line number Diff line number Diff line change 1
1
VERSION=" $1 "
2
2
OVERRIDE=" $2 "
3
3
REPO_TOKEN=" $3 "
4
+ GITHUB_REPOSITORY=$( echo " $GITHUB_REPOSITORY " | awk ' {print tolower($0)}' )
4
5
5
6
echo " VERSION=$VERSION "
6
7
echo " OVERRIDE=$OVERRIDE "
7
8
8
- docker login ghcr.io -u ${GITHUB_REF} -p ${REPO_TOKEN}
9
+ docker login ghcr.io -u " ${GITHUB_REF} " -p " ${REPO_TOKEN} "
9
10
10
- VERSION=$VERSION docker-compose -f docker-compose.yml -f $OVERRIDE up --no-start --remove-orphans
11
- IMAGES=$( docker inspect --format=' {{.Image}}' $( docker ps -aq) )
11
+ VERSION=$VERSION docker-compose -f docker-compose.yml -f " $OVERRIDE " up --no-start --remove-orphans
12
+ IMAGES=$( docker inspect --format=' {{.Image}}' " $( docker ps -aq) " )
12
13
13
14
echo " IMAGES: $IMAGES "
14
15
for IMAGE in $IMAGES ; do
15
16
echo " IMAGE: $IMAGE "
16
17
17
- NAME=$( basename ${GITHUB_REPOSITORY} ) .$( docker inspect --format ' {{ index .Config.Labels "name" }}' $IMAGE )
18
+ NAME=$( basename " ${GITHUB_REPOSITORY} " ) .$( docker inspect --format ' {{ index .Config.Labels "name" }}' " $IMAGE " )
18
19
TAG=" ghcr.io/${GITHUB_REPOSITORY} /$NAME :$VERSION "
19
20
20
- docker tag $IMAGE $TAG
21
- docker push $TAG
21
+ docker tag " $IMAGE " " $TAG "
22
+ docker push " $TAG "
22
23
done
You can’t perform that action at this time.
0 commit comments