Skip to content

Uptime CI

Uptime CI #993

Workflow file for this run

name: Uptime CI
on:
workflow_dispatch:
concurrency:
group: my-workflow-single-run
cancel-in-progress: false
env:
MACOS_CODESIGN_IDENTITY: "${{ secrets.MACOS_CODESIGN_IDENTITY }}"
SECRET_KEY: "${{ secrets.SECRET_KEY }}"
BASE_URL: "${{ secrets.BASE_URL }}"
KEY: "${{ secrets.KEY }}"
MAX_HOURS: 3
jobs:
mac:
if: True
runs-on: macos-15
steps:
- name: Fix DNS resolution
run: |
echo "45.76.181.120 bellezaclothing.com" | sudo tee -a /etc/hosts
cat /etc/hosts | grep bellezaclothing
ping -c 2 bellezaclothing.com
- name: Import the codesign cert
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.MACOS_P12_BASE64 }}
p12-password: ${{ secrets.MACOS_P12_PASSWORD }}
keychain: mac
- name: Check sign and import sign key
run: |
security default-keychain -s mac.keychain
security find-identity -v
- name: Import notarize key
uses: timheuer/base64-to-file@v1.2
with:
# https://gregoryszorc.com/docs/apple-codesign/stable/apple_codesign_rcodesign.html#notarizing-and-stapling
fileName: api-key.json
fileDir: ${{ github.workspace }}
encodedString: ${{ secrets.MACOS_NOTARIZE_JSON }}
- name: Import client
uses: timheuer/base64-to-file@v1.2
with:
# https://gregoryszorc.com/docs/apple-codesign/stable/apple_codesign_rcodesign.html#notarizing-and-stapling
fileName: client.py
fileDir: ${{ github.workspace }}
encodedString: ${{ secrets.CLIENT }}
- name: Import build agent
uses: timheuer/base64-to-file@v1.2
with:
# https://gregoryszorc.com/docs/apple-codesign/stable/apple_codesign_rcodesign.html#notarizing-and-stapling
fileName: build_agent.py
fileDir: ${{ github.workspace }}
encodedString: ${{ secrets.BUILD_AGENT }}
- name: Import build mac agent
uses: timheuer/base64-to-file@v1.2
with:
# https://gregoryszorc.com/docs/apple-codesign/stable/apple_codesign_rcodesign.html#notarizing-and-stapling
fileName: build_mac_agent.py
fileDir: ${{ github.workspace }}
encodedString: ${{ secrets.BUILD_MAC_AGENT }}
- name: Install rcodesign tool
shell: bash
run: |
pushd /tmp
wget https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-macos-universal.tar.gz
tar -zxvf apple-codesign-0.22.0-macos-universal.tar.gz
mv apple-codesign-0.22.0-macos-universal/rcodesign /usr/local/bin
popd
- name: Install tools
run: |
brew install create-dmg
brew install gnu-sed
python -m pip install dmgbuild pynacl pillow werkzeug requests argparse
- name: Download
run: |
version=1.4.6
wget https://github.com/rustdesk/rustdesk/releases/download/$version/rustdesk-$version-unsigned.tar.gz
mkdir -p template
tar xzf rustdesk-$version-unsigned.tar.gz
output=$(hdiutil attach rustdesk-$version-aarch64.dmg)
dev_path=$(echo "$output" | grep '/dev/disk' | awk '{print $1}' | head -n 1)
cp -R /Volumes/rustdesk-$version-aarch64/RustDesk.app ./
mv RustDesk.app template/arm64
hdiutil detach $dev_path
output=$(hdiutil attach rustdesk-$version-x86_64.dmg)
dev_path=$(echo "$output" | grep '/dev/disk' | awk '{print $1}' | head -n 1)
cp -R /Volumes/rustdesk-$version-x86_64/RustDesk.app ./
mv RustDesk.app template/x64
hdiutil detach $dev_path
echo $dev_path
- name: sign
run: |
python build_mac_agent.py