# 光湖 · CVM开机
name: CVM开机

on:
  workflow_dispatch:

jobs:
  power-on:
    runs-on: ubuntu
    steps:
      - name: 同步最新代码
        run: |
          cd /data/guanghulab/repo
          git fetch origin
          git reset --hard origin/main

      - name: 开机
        env:
          TENCENT_SECRET_ID: ${{ secrets.COS_SECRET_ID }}
          TENCENT_SECRET_KEY: ${{ secrets.COS_SECRET_KEY }}
          CVM_INSTANCE_ID: ${{ secrets.CVM_INSTANCE_ID }}
          CVM_REGION: ${{ secrets.CVM_REGION }}
        run: |
          bash scripts/cvm-power/cvm-power.sh start
