Allow local image build
- Remove dependency on github download - Add `github/build.sh` for local builds - Simplify gtaphhopper build - Simplify handling of `graphhopper.sh` and `config-example.yml`
هذا الالتزام موجود في:
15
.github/build-and-upload.sh
مباع
15
.github/build-and-upload.sh
مباع
@@ -2,30 +2,19 @@
|
||||
|
||||
echo "Cloning graphhopper"
|
||||
git clone https://github.com/graphhopper/graphhopper.git
|
||||
cd graphhopper
|
||||
echo "Downloading Dockerfile and graphhopper.sh"
|
||||
curl -L https://raw.githubusercontent.com/IsraelHikingMap/graphhopper-docker-image-push/main/Dockerfile > Dockerfile
|
||||
curl -L https://raw.githubusercontent.com/IsraelHikingMap/graphhopper-docker-image-push/main/graphhopper.sh > graphhopper.sh
|
||||
chmod +x ./graphhopper.sh
|
||||
echo "Building docker image"
|
||||
docker build . -t israelhikingmap/graphhopper:latest
|
||||
docker login --username $DOCKERHUB_USER --password $DOCKERHUB_TOKEN
|
||||
echo "Publishing docker image"
|
||||
docker push israelhikingmap/graphhopper:latest
|
||||
|
||||
TAG=`git for-each-ref --sort=committerdate refs/tags | tail -n 1 | cut -d "/" -f3`
|
||||
TAG=`cd graphhopper; git for-each-ref --sort=committerdate refs/tags | tail -n 1 | cut -d "/" -f3`
|
||||
if docker manifest inspect israelhikingmap/graphhopper:$TAG >/dev/null; then
|
||||
echo "No need to publish existing version: $TAG";
|
||||
else
|
||||
mv Dockerfile ../Dockerfile
|
||||
mv graphhopper.sh ../graphhopper.sh
|
||||
git checkout tags/$TAG
|
||||
mv ../Dockerfile Dockerfile
|
||||
mv ../graphhopper.sh graphhopper.sh
|
||||
(cd graphhopper ; git checkout tags/$TAG)
|
||||
echo "Building docker image for tag: $TAG"
|
||||
docker build . -t israelhikingmap/graphhopper:$TAG
|
||||
echo "Publishing docker image for tag: $TAG"
|
||||
docker push israelhikingmap/graphhopper:$TAG
|
||||
fi
|
||||
|
||||
|
||||
|
||||
6
.github/build.sh
مباع
Normal file
6
.github/build.sh
مباع
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Cloning graphhopper"
|
||||
git clone https://github.com/graphhopper/graphhopper.git
|
||||
echo "Building docker image"
|
||||
docker build . -t israelhikingmap/graphhopper:latest
|
||||
المرجع في مشكلة جديدة
حظر مستخدم