Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/actions/decrypt-secrets/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,32 @@ runs:
shell: bash
run: |
pip install pyzipper

- name: Decrypt and Mask
shell: python
env:
PYTHONUTF8: "1"
PYTHONIOENCODING: "utf-8"
run: |
import sys
import io
import pyzipper
import json
import os

# Полная замена стандартного вывода на UTF-8 с игнорированием ошибок кодировки
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace')

with pyzipper.AESZipFile('${{ inputs.zip_path }}') as zf:
zf.setpassword('${{ inputs.zip_password }}'.encode())
with zf.open('secrets.json') as f:
secrets = json.load(f)

with open(os.environ['GITHUB_ENV'], 'a') as env_file:
with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as env_file:
for key, value in secrets.items():
if value:
print(f"::add-mask::{value}")
env_file.write(f"{key}={value}\n")

print(f"Successfully masked {len(secrets)} secrets.")
43 changes: 30 additions & 13 deletions .github/workflows/bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
steps:
- name: Checkout source code
if: ${{ inputs.version != 'master' }}
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: rustdesk/rustdesk
ref: refs/tags/${{ inputs.version }}
submodules: recursive

- name: Checkout source code
if: ${{ inputs.version == 'master' }}
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: rustdesk/rustdesk
submodules: recursive
Expand Down Expand Up @@ -75,9 +75,17 @@ jobs:
with:
prefix-key: bridge-${{ matrix.job.os }}

- name: Cache cargo git
uses: actions/cache@v5
with:
path: ~/.cargo/git
key: bridge-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
bridge-cargo-git-

- name: Cache Bridge
id: cache-bridge
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: /tmp/flutter_rust_bridge
key: vcpkg-${{ matrix.job.arch }}
Expand All @@ -90,19 +98,28 @@ jobs:
cache: true

- name: Install flutter rust bridge deps
shell: bash
run: |
cargo install cargo-expand --version ${{ env.CARGO_EXPAND_VERSION }} --locked
cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid" --locked
pushd flutter && sed -i -e 's/extended_text: 14.0.0/extended_text: 13.0.0/g' pubspec.yaml && flutter pub get && popd
uses: nick-fields/retry@v4
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: |
cargo install cargo-expand --version ${{ env.CARGO_EXPAND_VERSION }} --locked
cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid" --locked
pushd flutter && sed -i -e 's/extended_text: 14.0.0/extended_text: 13.0.0/g' pubspec.yaml && flutter pub get && popd

- name: Run flutter rust bridge
run: |
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/Runner/bridge_generated.h
cp ./flutter/macos/Runner/bridge_generated.h ./flutter/ios/Runner/bridge_generated.h
uses: nick-fields/retry@v4
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: |
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/Runner/bridge_generated.h
cp ./flutter/macos/Runner/bridge_generated.h ./flutter/ios/Runner/bridge_generated.h

- name: Upload Artifact
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v7
with:
name: bridge-artifact
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
TAG_NAME: "nightly"
VERSION: "1.3.9"

jobs:
jobs:
build-rustdesk-web:
name: build-rustdesk-web
runs-on: ubuntu-24.04
Expand All @@ -16,7 +16,7 @@ jobs:
RELEASE_NAME: web-basic
steps:
- name: Checkout source code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: recursive

Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
popd

- name: Upload APK artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: web
path: flutter/build/rustdesk-${{ env.VERSION }}-${{ env.RELEASE_NAME }}.tar.gz
4 changes: 2 additions & 2 deletions .github/workflows/clear-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clear cache
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
console.log("About to clear")
Expand All @@ -34,4 +34,4 @@ jobs:
with:
accessed: true # Purge caches by their last accessed time (default)
created: false # Purge caches by their created time (default)
max-age: 1 # in seconds
max-age: 1 # in seconds
6 changes: 3 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ jobs:
fi

- name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v4
if: env.CREATE_IMAGE == 'true'
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
if: env.CREATE_IMAGE == 'true'

- name: Build and push
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
if: env.CREATE_IMAGE == 'true'
with:
push: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fetch-encrypted-secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download with Retry
uses: nick-fields/retry@v3
uses: nick-fields/retry@v4
with:
timeout_minutes: 1
max_attempts: 3
Expand All @@ -39,7 +39,7 @@ jobs:
else: raise e

- name: Upload Encrypted Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: encrypted-secrets-zip
path: secrets.zip
Expand Down
Loading