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