Skip to content

Vsphere cleanup job #32

Vsphere cleanup job

Vsphere cleanup job #32

---
name: Vsphere cleanup job
on:
workflow_dispatch:
schedule:
# run at 2:00 everyday
- cron: '0 2 * * *'
jobs:
cleanup-vsphere:
# Do not run this job on any fork repos
if: github.repository == 'virt-s1/rhel-edge'
runs-on: [kite, x86_64, rhos-01, rhel-9-3, medium]
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install python
run: sudo dnf install -y python3
- name: Setup govc
run: sudo curl -L -o - "https://github.com/vmware/govmomi/releases/download/v0.30.5/govc_Linux_x86_64.tar.gz" | sudo tar -C /usr/local/bin -xvzf - govc
- name: Cleanup vsphere
run: python tools/vsphere-cleanup.py
env:
GOVC_URL: ${{ secrets.GOVC_URL }}
GOVC_USERNAME: ${{ secrets.GOVC_USERNAME }}
GOVC_PASSWORD: ${{ secrets.GOVC_PASSWORD }}
GOVC_INSECURE: true
timeout-minutes: 30