Skip to content

Commit

Permalink
Update build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
xubiaolin authored May 20, 2024
1 parent acd108f commit b1c04f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ DOCKER_IMAGE="xubiaolin/zerotier-planet"
latest_tag=$(curl -s "https://api.github.com/repos/$USER/$REPO/tags" | jq -r '.[].name' | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$" | sort -V | tail -n 1)
latest_docker_tag=$(curl -s "https://hub.docker.com/v2/repositories/${DOCKER_IMAGE}/tags/" | jq -r '.results[].name' | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$" | sort -V | tail -n 1)

# if [ "$latest_tag" == "$latest_docker_tag" ]; then
# echo "No new version found"
# exit 0
# fi
if [ "$latest_tag" == "$latest_docker_tag" ]; then
echo "No new version found"
exit 0
fi

echo "Latest tag for $USER/$REPO matching latest is: $latest_tag"
docker buildx build --platform linux/arm64,linux/amd64 -t "$DOCKER_IMAGE":latest --push .
Expand Down

0 comments on commit b1c04f9

Please sign in to comment.