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 <