From 9c14dd3b4c1a38e5886aa944666a5b7134d0098e Mon Sep 17 00:00:00 2001 From: InAnYan Date: Wed, 29 Jul 2026 16:37:29 +0200 Subject: [PATCH] feat: add deploy compose --- .gitea/workflows/deploy-docker-compose.yml | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 .gitea/workflows/deploy-docker-compose.yml diff --git a/.gitea/workflows/deploy-docker-compose.yml b/.gitea/workflows/deploy-docker-compose.yml new file mode 100644 index 0000000..997b545 --- /dev/null +++ b/.gitea/workflows/deploy-docker-compose.yml @@ -0,0 +1,92 @@ +name: Deploy Docker Compose + +on: + workflow_call: + inputs: + vm_ip: + description: VM IP address + required: true + type: string + + jump_host: + type: string + default: 212.3.125.242 + + jump_port: + type: string + default: "2222" + + jump_user: + type: string + default: jump + + vm_port: + type: string + default: "22" + + vm_user: + type: string + default: debian + + compose_path: + type: string + default: "~/docker-compose.yml" + + working_directory: + type: string + default: "~" + + secrets: + jump_ssh_key: + required: true + + vm_ssh_key: + required: true + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Configure SSH + run: | + mkdir -p ~/.ssh + chmod 700 ~/.ssh + + echo "${{ secrets.jump_ssh_key }}" > ~/.ssh/jump_key + chmod 600 ~/.ssh/jump_key + + echo "${{ secrets.vm_ssh_key }}" > ~/.ssh/vm_key + chmod 600 ~/.ssh/vm_key + + cat > ~/.ssh/config <