feat: initial version

This commit is contained in:
2023-03-19 21:07:09 +01:00
commit 994187c1f1
9 changed files with 212 additions and 0 deletions

18
ci/docker-publish.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
DOCKER_SCOPE=${DOCKER_USERNAME:-"mastermindzh"}
TAGS=(
"latest"
"$(cat package.json | grep version | head -1 | awk -F: '{ print $2}' | sed 's/[\",]//g' | tr -d '[[:space:]]')"
"$(git rev-parse HEAD)"
)
NAME=$(cat package.json | grep name | head -1 | awk -F: '{ print $2}' | sed 's/[\",]//g' | tr -d '[[:space:]]')
docker build -t "$DOCKER_SCOPE/$NAME:latest" .
for tag in "${TAGS[@]}"; do
docker tag "$DOCKER_SCOPE/$NAME:latest" "$DOCKER_SCOPE/$NAME:$tag"
docker push "$DOCKER_SCOPE/$NAME:$tag"
done