get status from github api

This commit is contained in:
Bryan Gerlach
2026-03-10 23:54:09 -05:00
parent c24d4ab5a5
commit d186b7dd02
10 changed files with 159 additions and 530 deletions

View File

@@ -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
@@ -567,15 +540,6 @@ jobs:
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
continue-on-error: true
@@ -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
@@ -665,14 +611,6 @@ jobs:
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
with:

View File

@@ -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()
@@ -920,14 +830,6 @@ jobs:
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
with:

View File

@@ -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
@@ -225,14 +217,6 @@ jobs:
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"}'
- name: Install build runtime
run: |
brew install llvm create-dmg
@@ -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
@@ -530,14 +498,6 @@ jobs:
# 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
shell: bash
@@ -558,14 +518,6 @@ jobs:
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
run: |
@@ -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

View File

@@ -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
@@ -233,15 +224,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 Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
@@ -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 ? <UpdateMe /> : ""}||' ./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
@@ -389,15 +353,6 @@ jobs:
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
shell: pwsh
@@ -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

View File

@@ -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,28 +298,10 @@ 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
with:
@@ -449,15 +413,6 @@ jobs:
# <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/> \
# </security>' ./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
@@ -558,15 +504,6 @@ jobs:
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
shell: pwsh
@@ -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

View File

@@ -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
@@ -272,24 +263,6 @@ jobs:
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"}'
- name: magick stuff
if: ${{ env.iconlink_url != 'false' }}
uses: nick-fields/retry@v3
@@ -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
@@ -473,15 +428,6 @@ jobs:
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
shell: pwsh
@@ -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

View File

@@ -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)

View File

@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Generation Failed</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background-color: #f9f9f9;
color: #333;
}
.container {
text-align: center;
padding: 2rem;
background: white;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
max-width: 400px;
}
.icon {
font-size: 48px;
color: #d9534f;
margin-bottom: 1rem;
}
h1 {
margin: 0 0 1rem 0;
font-size: 24px;
}
p {
color: #666;
line-height: 1.5;
margin-bottom: 2rem;
}
.btn {
display: inline-block;
padding: 10px 20px;
background-color: #007bff;
color: white;
text-decoration: none;
border-radius: 4px;
font-weight: bold;
transition: background 0.2s;
}
.btn:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div class="container">
<div class="icon"></div>
<h1>Generation Failed</h1>
<p>Something went wrong during the GitHub Action process. This could be due to a timeout, a script error, or a server issue.</p>
<a href="/" class="btn">Return to Form</a>
</div>
<div class="container">
<div class="icon"></div>
<h1>Generation Failed</h1>
<p>Something went wrong during the process.</p>
<div style="background: #f1f1f1; padding: 15px; border-radius: 5px; margin-bottom: 20px;">
<a href="{{ log_url }}" target="_blank" style="color: #d9534f; font-weight: bold;">
Check GitHub Logs for Errors
</a>
</div>
<a href="/" class="btn">Return to Form</a>
</div>
</body>
</html>

View File

@@ -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;
}
</style>
</head>
<body>
@@ -140,8 +162,16 @@
<div class="progress-bar">
<div id="progressBarFill" class="progress-bar-fill"></div>
</div>
<p class="status-text">This can take 20-30 minutes (or longer if there are other users).</p>
<p class="status-text">This can take 30-45 minutes. You can leave this page open or come back later.</p>
<p class="status-text">Status: <span id="statusText">{{status}}</span></p>
<div class="log-container">
<p style="margin: 0 0 8px 0; color: #888;">Technical View</p>
<a href="{{ log_url }}" target="_blank" class="log-link">
View GitHub Action Logs
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>
</a>
</div>
</div>
<div id="macosNote" class="macos-note">
@@ -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
</script>
</body>
</html>

View File

@@ -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)
new_github_run = GithubRun(
uuid=myuuid,
status="Starting generator...please wait"
)
try:
response = requests.post(url, json=data, headers=headers)
print(response)
#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:
return JsonResponse({"error": "Something went wrong"})
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')