diff --git a/.github/workflows/generator-android.yml b/.github/workflows/generator-android.yml index 166fdd1..17a3e5c 100644 --- a/.github/workflows/generator-android.yml +++ b/.github/workflows/generator-android.yml @@ -131,15 +131,6 @@ jobs: run: | echo "STATUS_URL=${{ env.apiServer }}/api/updategh" >> $GITHUB_ENV - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "5% complete"}' - - name: Install dependencies run: | sudo apt-get update @@ -433,15 +424,6 @@ jobs: sed -i -e 's|updateUrl.isNotEmpty|false|' ./flutter/lib/desktop/pages/desktop_home_page.dart sed -i '/let (request, url) =/,/Ok(())/{/Ok(())/!d}' ./src/common.rs - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "35% complete"}' - - name: replace flutter icons if: ${{ env.iconlink_url != 'false' }} run: | @@ -488,15 +470,6 @@ jobs: name: librustdesk.so.${{ matrix.job.target }} path: ./target/${{ matrix.job.target }}/release/liblibrustdesk.so - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "45% complete"}' - - name: icons if: ${{ env.iconlink_url != 'false' }} continue-on-error: true @@ -566,15 +539,6 @@ jobs: mkdir -p signed-apk; pushd signed-apk mv ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk ./${{ env.filename }}-${{ matrix.job.arch }}.apk popd - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "75% complete"}' - uses: r0adkll/sign-android-release@v1 name: Sign app APK @@ -611,24 +575,6 @@ jobs: command: | curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./signed-apk/${{ env.filename }}-${{ matrix.job.arch }}.apk" ${{ env.apiServer }}/api/save_custom_client - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation failed, try again"}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation cancelled, try again"}' - deploy: needs: [build-rustdesk-android] runs-on: ubuntu-latest @@ -664,14 +610,6 @@ jobs: if: ${{ env.rdgen == 'false' }} run: | echo "STATUS_URL=${{ env.apiServer }}/api/updategh" >> $GITHUB_ENV - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Success"}' - uses: geekyeggo/delete-artifact@v5 continue-on-error: true diff --git a/.github/workflows/generator-linux.yml b/.github/workflows/generator-linux.yml index 63905be..d89e3e9 100644 --- a/.github/workflows/generator-linux.yml +++ b/.github/workflows/generator-linux.yml @@ -106,15 +106,6 @@ jobs: run: | echo "STATUS_URL=${{ env.apiServer }}/api/updategh" >> $GITHUB_ENV - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "5% complete"}' - - name: Maximize build space run: | sudo rm -rf /opt/ghc @@ -175,15 +166,6 @@ jobs: # only build cdylib sed -i "s/\[\"cdylib\", \"staticlib\", \"rlib\"\]/\[\"cdylib\"\]/g" Cargo.toml - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "15% complete"}' - - name: Restore bridge files if: matrix.job.arch == 'x86_64' || env.UPLOAD_ARTIFACT == 'true' uses: actions/download-artifact@master @@ -366,15 +348,6 @@ jobs: name: bridge-artifact path: ./ - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "65% complete"}' - - uses: rustdesk-org/run-on-arch-action@amd64-support name: Build rustdesk id: vcpkg @@ -628,33 +601,6 @@ jobs: name: ${{ env.filename }}-${{ matrix.job.arch }}.deb path: ./output/${{ env.filename }}-${{ matrix.job.arch }}.deb - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Finished ${{ matrix.job.arch }}"}' - - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation failed, try again"}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation cancelled, try again"}' - build-appimage: name: Build appimage ${{ matrix.job.target }} needs: [build-rustdesk-linux] @@ -736,24 +682,6 @@ jobs: command: | curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./appimage/${{ env.filename }}-${{ matrix.job.arch }}.AppImage" ${{ env.apiServer }}/api/save_custom_client - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "${{ matrix.job.arch }} AppImage failed, waiting on others to finish."}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "${{ matrix.job.arch }} AppImage cancelled, waiting on others to finish."}' - build-flatpak: name: Build flatpak ${{ matrix.job.target }}${{ matrix.job.suffix }} needs: @@ -865,24 +793,6 @@ jobs: command: | curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./flatpak/${{ env.filename }}-${{ matrix.job.arch }}.flatpak" ${{ env.apiServer }}/api/save_custom_client - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "${{ matrix.job.arch }} Flatpak failed, waiting on others to finish."}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "${{ matrix.job.arch }} Flatpak cancelled, waiting on others to finish."}' - deploy: needs: [build-rustdesk-linux,build-flatpak,build-appimage] if: always() @@ -919,14 +829,6 @@ jobs: if: ${{ env.rdgen == 'false' }} run: | echo "STATUS_URL=${{ env.apiServer }}/api/updategh" >> $GITHUB_ENV - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Success"}' - uses: geekyeggo/delete-artifact@v5 continue-on-error: true diff --git a/.github/workflows/generator-macos.yml b/.github/workflows/generator-macos.yml index 4847c24..dc84a04 100644 --- a/.github/workflows/generator-macos.yml +++ b/.github/workflows/generator-macos.yml @@ -106,14 +106,6 @@ jobs: core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "5% complete"}' - - name: Checkout source code if: ${{ env.VERSION != 'master' }} uses: actions/checkout@v4 @@ -223,15 +215,7 @@ jobs: echo " archive: ^3.6.1" > ./flutter/temp_dependency.txt awk '/intl:/{print;system("cat ./flutter/temp_dependency.txt");next}1' ./flutter/pubspec.yaml > ./flutter/pubspec.yaml.tmp mv ./flutter/pubspec.yaml.tmp ./flutter/pubspec.yaml - rm ./flutter/temp_dependency.txt - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "10% complete"}' + rm ./flutter/temp_dependency.txt - name: Install build runtime run: | @@ -466,14 +450,6 @@ jobs: sed -i -e 's|updateUrl.isNotEmpty|false|' ./flutter/lib/desktop/pages/desktop_home_page.dart sed -i '/let (request, url) =/,/Ok(())/{/Ok(())/!d}' ./src/common.rs - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "20% complete"}' - - name: Restore bridge files uses: actions/download-artifact@master with: @@ -502,14 +478,6 @@ jobs: fi head -n 100 "${VCPKG_ROOT}/buildtrees/ffmpeg/build-${{ matrix.job.vcpkg-triplet }}-rel-out.log" || true - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "25% complete"}' - - name: Create MacOS directory structure run: | mkdir -p ./build/macos/Build/Products/Release/RustDesk.app/Contents/MacOS @@ -529,14 +497,6 @@ jobs: # - name: Copy service file # run: | # cp -rf ../target/release/service ./build/macos/Build/Products/Release/RustDesk.app/Contents/MacOS/ - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "50% complete, this step takes about 5 minutes, be patient."}' - name: Install rcodesign tool if: env.MACOS_P12_BASE64 != null @@ -557,14 +517,6 @@ jobs: else brew install pkg-config fi - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "70% complete, this step takes about 5 minutes, be patient."}' - name: Show version information (Rust, cargo, Clang) shell: bash @@ -607,14 +559,6 @@ jobs: -O "$ASSETS_DIR/logo.png" \ "${{ env.logolink_url }}/get_png?filename=${{ env.logolink_file }}&uuid=${{ env.logolink_uuid }}" - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "85% complete"}' - - name: Sign macOS app bundle if: env.MACOS_P12_BASE64 != '' run: | @@ -742,32 +686,6 @@ jobs: -F "file=@$GITHUB_WORKSPACE/${{ env.filename }}-${{ matrix.job.arch }}.dmg" \ "${{ env.apiServer }}/api/save_custom_client" - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Success"}' - - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation failed, try again"}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation cancelled, try again"}' - cleanup: needs: [build-for-macos] runs-on: ubuntu-latest diff --git a/.github/workflows/generator-windows-x86.yml b/.github/workflows/generator-windows-x86.yml index 042d38c..57eed60 100644 --- a/.github/workflows/generator-windows-x86.yml +++ b/.github/workflows/generator-windows-x86.yml @@ -110,15 +110,6 @@ jobs: run: | echo "STATUS_URL=${{ env.apiServer }}/api/updategh" >> $env:GITHUB_ENV - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "5% complete"}' - - name: Checkout source code if: ${{ env.VERSION != 'master' }} uses: actions/checkout@v4 @@ -232,15 +223,6 @@ jobs: uses: rustdesk-org/install-llvm-action-32bit@master with: version: ${{ env.LLVM_VERSION }} - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "10% complete"}' - name: Install Rust toolchain uses: dtolnay/rust-toolchain@v1 @@ -253,15 +235,6 @@ jobs: with: prefix-key: ${{ matrix.job.os }}-sciter - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "20% complete"}' - - name: Setup vcpkg with Github Actions binary cache uses: lukka/run-vcpkg@v11 with: @@ -344,15 +317,6 @@ jobs: sed -i -e 's|{software_update_url ? : ""}||' ./src/ui/index.tis sed -i '/let (request, url) =/,/Ok(())/{/Ok(())/!d}' ./src/common.rs - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "50% complete"}' - - name: Build rustdesk id: build shell: bash @@ -388,15 +352,6 @@ jobs: echo "list ./libs/portable/Runner.res"; ls -l ./libs/portable/Runner.res; fi - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "70% complete"}' - name: zip dlls continue-on-error: true @@ -443,15 +398,6 @@ jobs: mkdir -p ./SignOutput mv ./target/release/rustdesk-portable-packer.exe "./SignOutput/rustdesk.exe" - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "85% complete"}' - - name: zip exe continue-on-error: true shell: pwsh @@ -496,32 +442,6 @@ jobs: run: | curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./SignOutput/${{ env.filename }}.exe" ${{ env.apiServer }}/api/save_custom_client - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Success"}' - - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation failed, try again"}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation cancelled, try again"}' - cleanup: needs: [build-for-windows-sciter] runs-on: ubuntu-latest diff --git a/.github/workflows/generator-windows.yml b/.github/workflows/generator-windows.yml index c784840..52de8fd 100644 --- a/.github/workflows/generator-windows.yml +++ b/.github/workflows/generator-windows.yml @@ -122,15 +122,6 @@ jobs: run: | echo "STATUS_URL=${{ env.apiServer }}/api/updategh" >> $env:GITHUB_ENV - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "5% complete"}' - - name: Checkout source code if: ${{ env.VERSION != 'master' }} uses: actions/checkout@v4 @@ -278,15 +269,6 @@ jobs: with: version: ${{ env.LLVM_VERSION }} - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "10% complete"}' - - name: Install flutter uses: subosito/flutter-action@v2.12.0 #https://github.com/subosito/flutter-action/issues/277 with: @@ -316,27 +298,9 @@ jobs: targets: ${{ matrix.job.target }} components: "rustfmt" - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "15% complete"}' - - uses: Swatinem/rust-cache@v2 with: prefix-key: ${{ matrix.job.os }} - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "20% complete"}' - name: Setup vcpkg with Github Actions binary cache uses: lukka/run-vcpkg@v11 @@ -449,15 +413,6 @@ jobs: # \ # ' ./flutter/windows/runner/runner.exe.manifest - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "25% complete"}' - - name: replace flutter icons if: ${{ env.iconlink_url != 'false' }} continue-on-error: true @@ -468,15 +423,6 @@ jobs: flutter pub run flutter_launcher_icons cd .. - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "50% complete"}' - - name: Build rustdesk run: | # Windows: build RustDesk @@ -557,15 +503,6 @@ jobs: with: name: topmostwindow-artifacts path: "./rustdesk" - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "70% complete"}' - name: zip dlls continue-on-error: true @@ -630,15 +567,6 @@ jobs: mv ./Package/bin/x64/Release/en-us/Package.msi ../../SignOutput/rustdesk.msi sha256sum ../../SignOutput/rustdesk.msi - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "85% complete"}' - - name: zip exe and msi continue-on-error: true shell: pwsh @@ -698,32 +626,6 @@ jobs: curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./SignOutput/${{ env.filename }}.exe" ${{ env.apiServer }}/api/save_custom_client curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./SignOutput/${{ env.filename }}.msi" ${{ env.apiServer }}/api/save_custom_client || true - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Success"}' - - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation failed, try again"}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation cancelled, try again"}' - cleanup: needs: [build-for-windows-flutter] runs-on: ubuntu-latest diff --git a/.github/workflows/sh-generator-windows.yml b/.github/workflows/sh-generator-windows.yml index 2d73f9d..0672d0c 100644 --- a/.github/workflows/sh-generator-windows.yml +++ b/.github/workflows/sh-generator-windows.yml @@ -122,15 +122,6 @@ jobs: run: | echo "STATUS_URL=${{ env.apiServer }}/api/updategh" >> $env:GITHUB_ENV - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "5% complete"}' - - name: Checkout source code if: ${{ env.VERSION != 'master' }} uses: actions/checkout@v4 @@ -270,25 +261,7 @@ jobs: python allowCustom.py # Remove Setup Server Tip Invoke-WebRequest -Uri https://raw.githubusercontent.com/bryangerlach/rdgen/refs/heads/master/.github/patches/removeSetupServerTip.diff -OutFile removeSetupServerTip.diff - git apply removeSetupServerTip.diff - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "10% complete"}' - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "20% complete"}' + git apply removeSetupServerTip.diff - name: magick stuff if: ${{ env.iconlink_url != 'false' }} @@ -364,15 +337,6 @@ jobs: sed -i -e 's|updateUrl.isNotEmpty|false|' ./flutter/lib/desktop/pages/desktop_home_page.dart sed -i '/let (request, url) =/,/Ok(())/{/Ok(())/!d}' ./src/common.rs - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "25% complete"}' - - name: replace flutter icons if: ${{ env.iconlink_url != 'false' }} continue-on-error: true @@ -383,15 +347,6 @@ jobs: flutter pub run flutter_launcher_icons cd .. - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "50% complete"}' - - name: Build rustdesk run: | # Windows: build RustDesk @@ -472,15 +427,6 @@ jobs: with: name: topmostwindow-artifacts path: "./rustdesk" - - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "70% complete"}' - name: zip dlls continue-on-error: true @@ -545,15 +491,6 @@ jobs: mv ./Package/bin/x64/Release/en-us/Package.msi ../../SignOutput/rustdesk.msi sha256sum ../../SignOutput/rustdesk.msi - - name: Report Status - uses: fjogeleit/http-request-action@v1 - continue-on-error: true - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "85% complete"}' - - name: zip exe and msi continue-on-error: true shell: pwsh @@ -613,32 +550,6 @@ jobs: curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./SignOutput/${{ env.filename }}.exe" ${{ env.apiServer }}/api/save_custom_client curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ env.token }}" -F "file=@./SignOutput/${{ env.filename }}.msi" ${{ env.apiServer }}/api/save_custom_client || true - - name: Report Status - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Success"}' - - - name: failed - if: failure() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation failed, try again"}' - - - name: failed - if: cancelled() - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ env.STATUS_URL }} - method: 'POST' - customHeaders: '{"Content-Type": "application/json"}' - data: '{"uuid": "${{ env.uuid }}", "status": "Generation cancelled, try again"}' - cleanup: needs: [build-for-windows-flutter] runs-on: ubuntu-latest diff --git a/rdgenerator/models.py b/rdgenerator/models.py index a4f95c1..2c04e2e 100644 --- a/rdgenerator/models.py +++ b/rdgenerator/models.py @@ -4,3 +4,5 @@ class GithubRun(models.Model): id = models.IntegerField(verbose_name="ID",primary_key=True) uuid = models.CharField(verbose_name="uuid", max_length=100) status = models.CharField(verbose_name="status", max_length=100) + github_run_id = models.BigIntegerField(null=True, blank=True) + created_at = models.DateTimeField(auto_now_add=True) diff --git a/rdgenerator/templates/failure.html b/rdgenerator/templates/failure.html new file mode 100644 index 0000000..c1978b0 --- /dev/null +++ b/rdgenerator/templates/failure.html @@ -0,0 +1,80 @@ + + + + + + Generation Failed + + + + +
+
+

Generation Failed

+

Something went wrong during the GitHub Action process. This could be due to a timeout, a script error, or a server issue.

+ + Return to Form +
+ +
+
+

Generation Failed

+

Something went wrong during the process.

+ +
+ + Check GitHub Logs for Errors + +
+ + Return to Form +
+ + + \ No newline at end of file diff --git a/rdgenerator/templates/waiting.html b/rdgenerator/templates/waiting.html index 8328457..8da8d4c 100644 --- a/rdgenerator/templates/waiting.html +++ b/rdgenerator/templates/waiting.html @@ -69,6 +69,28 @@ background-color: #3498db; transition: width 0.5s ease-in-out; } + .log-container { + margin-top: 30px; + padding: 15px; + background: rgba(255, 255, 255, 0.5); + border-radius: 12px; + font-size: 0.85em; + max-width: 320px; + margin-left: auto; + margin-right: auto; + border: 1px solid rgba(0,0,0,0.05); + } + .log-link { + color: #3498db; + text-decoration: none; + font-weight: 600; + display: inline-flex; + align-items: center; + gap: 5px; + } + .log-link:hover { + text-decoration: underline; + } @@ -140,8 +162,16 @@
-

This can take 20-30 minutes (or longer if there are other users).

+

This can take 30-45 minutes. You can leave this page open or come back later.

Status: {{status}}

+ +
+

Technical View

+ + View GitHub Action Logs + + +
@@ -212,7 +242,7 @@ setTimeout(function() { window.location.replace('/check_for_file?filename={{filename}}&uuid={{uuid}}&platform={{platform}}'); - }, 20000); // 20000 milliseconds = 20 seconds + }, 30000); // 20000 milliseconds = 20 seconds diff --git a/rdgenerator/views.py b/rdgenerator/views.py index 1d6d372..94639a6 100644 --- a/rdgenerator/views.py +++ b/rdgenerator/views.py @@ -302,7 +302,8 @@ def generator_view(request): "inputs":{ "version":version, "zip_url":zip_url - } + }, + "return_run_details": True } #print(data) headers = { @@ -311,13 +312,26 @@ def generator_view(request): 'Authorization': 'Bearer '+_settings.GHBEARER, 'X-GitHub-Api-Version': '2022-11-28' } - create_github_run(myuuid) - response = requests.post(url, json=data, headers=headers) - print(response) - if response.status_code == 204 or response.status_code == 200: - return render(request, 'waiting.html', {'filename':filename, 'uuid':myuuid, 'status':"Starting generator...please wait", 'platform':platform}) - else: - return JsonResponse({"error": "Something went wrong"}) + new_github_run = GithubRun( + uuid=myuuid, + status="Starting generator...please wait" + ) + try: + response = requests.post(url, json=data, headers=headers) + #print(response) + if response.status_code == 204 or response.status_code == 200: + github_data = response.json() + new_github_run.github_run_id = github_data.get('id') + new_github_run.status = "in_progress" + new_github_run.save() + + return render(request, 'waiting.html', {'filename':filename, 'uuid':myuuid, 'status':"Starting generator...please wait", 'platform':platform}) + else: + new_github_run.delete() + return JsonResponse({"error": "GitHub rejected the start request"}, status=500) + except Exception as e: + new_github_run.delete() + return JsonResponse({"error": f"Connection error: {str(e)}"}, status=500) else: form = GenerateForm() #return render(request, 'maintenance.html') @@ -330,12 +344,31 @@ def check_for_file(request): platform = request.GET['platform'] gh_run = GithubRun.objects.filter(Q(uuid=uuid)).first() status = gh_run.status + if status not in ['success', 'failure', 'cancelled']: + headers = {"Authorization": f"Bearer {_settings.GHBEARER}"} + api_url = f"https://api.github.com/repos/{_settings.GHUSER}/{_settings.REPONAME}/actions/runs/{gh_run.github_run_id}" + github_log_url = f"https://github.com/{_settings.GHUSER}/{_settings.REPONAME}/actions/runs/{gh_run.github_run_id}" + + timeout_limit = gh_run.created_at + timedelta(hours=2) + + try: + gh_response = requests.get(api_url, headers=headers) + if gh_response.status_code == 200: + gh_data = gh_response.json() + + if gh_data['status'] == 'completed': + gh_run.status = gh_data['conclusion'] # 'success' or 'failure' + gh_run.save() + except Exception as e: + print(f"Error checking GitHub: {e}") #if file_exists: - if status == "Success": + if gh_run.status == "success": return render(request, 'generated.html', {'filename': filename, 'uuid':uuid, 'platform':platform}) + elif gh_run.status == "failure": + return render(request, 'failure.html', {'log_url': github_log_url}) else: - return render(request, 'waiting.html', {'filename':filename, 'uuid':uuid, 'status':status, 'platform':platform}) + return render(request, 'waiting.html', {'filename':filename, 'uuid':uuid, 'status':status, 'platform':platform, 'log_url': github_log_url}) def download(request): filename = request.GET['filename'] @@ -363,13 +396,6 @@ def get_png(request): return response -def create_github_run(myuuid): - new_github_run = GithubRun( - uuid=myuuid, - status="Starting generator...please wait" - ) - new_github_run.save() - def update_github_run(request): data = json.loads(request.body) myuuid = data.get('uuid')