Browse Source

dockerfile path fix for build

crocandr 3 years ago
parent
commit
c525c4ff3e
1 changed files with 7 additions and 7 deletions
  1. 7 7
      .github/workflows/main.yml

+ 7 - 7
.github/workflows/main.yml

@@ -41,25 +41,25 @@ jobs:
         run: |
           for ARCH in AMD64 ARM; do
             echo "Creating container for $ARCH ..."
-            cp -f $SRC_DIR/Dockerfile $SRC_DIR/Dockerfile-$ARCH
+            cp -f $Dockerfile $Dockerfile-$ARCH
             ls -hal $SRC_DIR  ls -hal $TMP_DIR  cat $TMP_DIR/latest_url-*$ARCH*.txt
             LATEST_URL=$( cat $TMP_DIR/latest_url-*$ARCH*.txt );
             echo "Latest URL: $LATEST_URL"
             [ -z "$LATEST_URL" ] && { echo "Latest url not found"; exit 1; }
-            sed -i "s@ENV.*DOWNLOAD_URL.*@ENV DOWNLOAD_URL $LATEST_URL@g" $SRC_DIR/Dockerfile-$ARCH 
-            echo "--- Dockerfile for $ARCH ---"  cat $SRC_DIR/Dockerfile-$ARCH  echo "-------------------------"
-            VERSION_DOWNLOAD_URL=$( grep DOWNLOAD_URL $SRC_DIR/Dockerfile-$ARCH | awk '{ print $3 }' ) 
+            sed -i "s@ENV.*DOWNLOAD_URL.*@ENV DOWNLOAD_URL $LATEST_URL@g" $Dockerfile-$ARCH 
+            echo "--- Dockerfile for $ARCH ---"  cat $Dockerfile-$ARCH  echo "-------------------------"
+            VERSION_DOWNLOAD_URL=$( grep DOWNLOAD_URL $Dockerfile-$ARCH | awk '{ print $3 }' ) 
             SOFTETHER_VERSION=$( basename $VERSION_DOWNLOAD_URL | sed "s@softether-vpnserver-@@g" | cut -f1-3 -d'-' )  echo "Softether version is $SOFTETHER_VERSION" 
-            cat $SRC_DIR/Dockerfile-$ARCH 
+            cat $Dockerfile-$ARCH
             case $ARCH in
               "ARM" )
                 echo "  Using docker buildx method ..." 
-                docker buildx build --rm --platform linux/arm64 -t croc/softether-arm64 -f $SRC_DIR/Dockerfile-$ARCH $SRC_DIR 
+                docker buildx build --rm --platform linux/arm64 -t croc/softether-arm64 -f $Dockerfile-$ARCH $SRC_DIR 
                 docker tag croc/softether croc/softether-arm64:$SOFTETHER_VERSION
                 ;;
               * )
                 echo "  Using normal docker build method ..." 
-                docker build -t croc/softether -f $SRC_DIR/Dockerfile-$ARCH $SRC_DIR 
+                docker build -t croc/softether -f $Dockerfile-$ARCH $SRC_DIR 
                 docker tag croc/softether croc/softether:$SOFTETHER_VERSION
                 ;;
             esac