46 lines
1000 B
YAML
46 lines
1000 B
YAML
name: Create VM at proxmox
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
logLevel:
|
|
description: 'Log level'
|
|
required: true
|
|
default: 'warning'
|
|
type: choice
|
|
options:
|
|
- info
|
|
- warning
|
|
- debug
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout Gitea repository
|
|
uses: gitea/checkout@v3
|
|
|
|
- name: List files for debugging
|
|
run: ls -l ./scripts
|
|
|
|
- name: upload script to Proxmox
|
|
uses: appleboy/scp-action@master
|
|
with:
|
|
host: 192.168.11.102
|
|
username: root
|
|
password: ${{ secrets.PASSWORD }}
|
|
port: 22
|
|
source: './scripts/create_cloud_VM_140.sh'
|
|
target: '/root/scripts/'
|
|
|
|
- name: executing remote bash script
|
|
uses: appleboy/ssh-action@v1.2.0
|
|
with:
|
|
host: 192.168.11.102
|
|
username: root
|
|
password: ${{ secrets.PASSWORD }}
|
|
port: 22
|
|
script: |
|
|
bash /root/scripts/create_cloud_VM_140.sh |