[macos-runner] Replace SSH-based VM wake/sleep with a dedicated runner container
Drop the SSH + restricted-key design entirely. wake/sleep now runs on a new macos-ctl runner (its own Docker container on the VPS, Docker socket mounted) which runs docker start/stop macos directly on the sibling container - no SSH indirection, and no borrowing of another project's runner (pedifoods-web) to do it.
This commit is contained in:
@@ -7,19 +7,10 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
wake-macos-vm:
|
wake-macos-vm:
|
||||||
runs-on: pedifoods
|
runs-on: macos-ctl
|
||||||
container:
|
|
||||||
image: alpine:3.20
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install ssh client
|
|
||||||
run: apk add --no-cache openssh-client
|
|
||||||
- name: Start macOS VM container
|
- name: Start macOS VM container
|
||||||
run: |
|
run: docker start macos
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.VPS_SSH_KEY }}" > ~/.ssh/id_ed25519
|
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
|
||||||
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 \
|
|
||||||
${{ secrets.VPS_SSH_USER }}@${{ secrets.VPS_SSH_HOST }} start
|
|
||||||
|
|
||||||
build-and-upload:
|
build-and-upload:
|
||||||
needs: wake-macos-vm
|
needs: wake-macos-vm
|
||||||
@@ -64,16 +55,7 @@ jobs:
|
|||||||
sleep-macos-vm:
|
sleep-macos-vm:
|
||||||
needs: build-and-upload
|
needs: build-and-upload
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: pedifoods
|
runs-on: macos-ctl
|
||||||
container:
|
|
||||||
image: alpine:3.20
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install ssh client
|
|
||||||
run: apk add --no-cache openssh-client
|
|
||||||
- name: Stop macOS VM container
|
- name: Stop macOS VM container
|
||||||
run: |
|
run: docker stop macos
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.VPS_SSH_KEY }}" > ~/.ssh/id_ed25519
|
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
|
||||||
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 \
|
|
||||||
${{ secrets.VPS_SSH_USER }}@${{ secrets.VPS_SSH_HOST }} stop
|
|
||||||
|
|||||||
@@ -7,19 +7,10 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
wake-macos-vm:
|
wake-macos-vm:
|
||||||
runs-on: pedifoods
|
runs-on: macos-ctl
|
||||||
container:
|
|
||||||
image: alpine:3.20
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install ssh client
|
|
||||||
run: apk add --no-cache openssh-client
|
|
||||||
- name: Start macOS VM container
|
- name: Start macOS VM container
|
||||||
run: |
|
run: docker start macos
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.VPS_SSH_KEY }}" > ~/.ssh/id_ed25519
|
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
|
||||||
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 \
|
|
||||||
${{ secrets.VPS_SSH_USER }}@${{ secrets.VPS_SSH_HOST }} start
|
|
||||||
|
|
||||||
build-archive-deliver:
|
build-archive-deliver:
|
||||||
needs: wake-macos-vm
|
needs: wake-macos-vm
|
||||||
@@ -71,16 +62,7 @@ jobs:
|
|||||||
sleep-macos-vm:
|
sleep-macos-vm:
|
||||||
needs: build-archive-deliver
|
needs: build-archive-deliver
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: pedifoods
|
runs-on: macos-ctl
|
||||||
container:
|
|
||||||
image: alpine:3.20
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install ssh client
|
|
||||||
run: apk add --no-cache openssh-client
|
|
||||||
- name: Stop macOS VM container
|
- name: Stop macOS VM container
|
||||||
run: |
|
run: docker stop macos
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.VPS_SSH_KEY }}" > ~/.ssh/id_ed25519
|
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
|
||||||
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 \
|
|
||||||
${{ secrets.VPS_SSH_USER }}@${{ secrets.VPS_SSH_HOST }} stop
|
|
||||||
|
|||||||
@@ -7,19 +7,10 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
wake-macos-vm:
|
wake-macos-vm:
|
||||||
runs-on: pedifoods
|
runs-on: macos-ctl
|
||||||
container:
|
|
||||||
image: alpine:3.20
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install ssh client
|
|
||||||
run: apk add --no-cache openssh-client
|
|
||||||
- name: Start macOS VM container
|
- name: Start macOS VM container
|
||||||
run: |
|
run: docker start macos
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.VPS_SSH_KEY }}" > ~/.ssh/id_ed25519
|
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
|
||||||
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 \
|
|
||||||
${{ secrets.VPS_SSH_USER }}@${{ secrets.VPS_SSH_HOST }} start
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
needs: wake-macos-vm
|
needs: wake-macos-vm
|
||||||
@@ -39,16 +30,7 @@ jobs:
|
|||||||
sleep-macos-vm:
|
sleep-macos-vm:
|
||||||
needs: test
|
needs: test
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: pedifoods
|
runs-on: macos-ctl
|
||||||
container:
|
|
||||||
image: alpine:3.20
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install ssh client
|
|
||||||
run: apk add --no-cache openssh-client
|
|
||||||
- name: Stop macOS VM container
|
- name: Stop macOS VM container
|
||||||
run: |
|
run: docker stop macos
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.VPS_SSH_KEY }}" > ~/.ssh/id_ed25519
|
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
|
||||||
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 \
|
|
||||||
${{ secrets.VPS_SSH_USER }}@${{ secrets.VPS_SSH_HOST }} stop
|
|
||||||
|
|||||||
Reference in New Issue
Block a user