Vsphere cleanup job #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |