Browse Source

action update - common job - delete external file

crocandr 3 years ago
parent
commit
1366f4939d
1 changed files with 11 additions and 1 deletions
  1. 11 1
      .github/workflows/main.yml

+ 11 - 1
.github/workflows/main.yml

@@ -25,7 +25,17 @@ jobs:
     steps:
       # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
       - uses: actions/checkout@v3
-      - uses: ./.github/workflows/get-latest-url.yml@main
+      - name: get latest url
+        run: |
+          BASE_URL="https://www.softether-download.com"
+          LATEST_FOLDER=$( curl -s $BASE_URL/files/softether/ | tr ';' '\n' | grep -i href | awk -F'"' '{ print $2 }' | sort -n | tail -n1 )
+          echo "Latest folder is $LATEST_FOLDER"
+          for FOLDER_STRING in "Intel_x64_or_AMD64" "ARM_64bit"
+          do
+            LATEST=$( curl -s "$BASE_URL/$LATEST_FOLDER/Linux/SoftEther_VPN_Server/64bit_-_$FOLDER_STRING/" | tr '<' '\n' | grep -i href | grep -i tar.gz | awk -F '"' '{ print $2 }' ) 
+            echo -e "\nURL for $FOLDER_STRING: " 
+            echo "$BASE_URL/$LATEST" | tee latest_url-$FOLDER_STRING.txt
+          done
       # Runs a set of commands using the runners shell
       - name: build container - AMD64
         env: