This commit is contained in:
@@ -157,8 +157,9 @@ steps:
|
||||
test -z "$PNAME" && continue
|
||||
test ! -d "$PDIR" && continue
|
||||
|
||||
LOWER=$(echo "$PNAME" | tr 'A-Z' 'a-z')
|
||||
TAG="git.modwad.pl/faapp/${LOWER}"
|
||||
echo "$PNAME" | tr 'A-Z' 'a-z' > /tmp/lower.txt
|
||||
echo "git.modwad.pl/faapp/" > /tmp/tag.txt
|
||||
cat /tmp/lower.txt >> /tmp/tag.txt
|
||||
|
||||
cat > "${PDIR}/Dockerfile.temp" <<'DFEND'
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||
@@ -179,13 +180,13 @@ steps:
|
||||
sed -i "s/PROJECTNAME/${PNAME}/g" "${PDIR}/Dockerfile.temp"
|
||||
|
||||
docker buildx build --platform linux/amd64 \
|
||||
-t "${TAG}:${CI_COMMIT_SHA}" \
|
||||
-t "${TAG}:latest" \
|
||||
-t "$(cat /tmp/tag.txt):${CI_COMMIT_SHA}" \
|
||||
-t "$(cat /tmp/tag.txt):latest" \
|
||||
-f "${PDIR}/Dockerfile.temp" \
|
||||
"${PDIR}"
|
||||
|
||||
docker push "${TAG}:${CI_COMMIT_SHA}"
|
||||
docker push "${TAG}:latest"
|
||||
docker push "$(cat /tmp/tag.txt):${CI_COMMIT_SHA}"
|
||||
docker push "$(cat /tmp/tag.txt):latest"
|
||||
|
||||
rm -f "${PDIR}/Dockerfile.temp"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user