Delete instance #13
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: Delete instance | |
on: | |
workflow_dispatch: | |
inputs: | |
instanceNameSuffix: | |
description: 'Instance name suffix' | |
required: false | |
default: '' | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
delete-instance: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install | |
- name: Run Python script | |
run: poetry run python main.py delete | |
env: | |
OVH_ENDPOINT: ${{ vars.OVH_ENDPOINT }} | |
OVH_INSTANCE_FLAVOR_ID: ${{ vars.OVH_INSTANCE_FLAVOR_ID }} | |
OVH_INSTANCE_IMAGE_ID: ${{ vars.OVH_INSTANCE_IMAGE_ID }} | |
OVH_REGION: ${{ vars.OVH_REGION }} | |
OVH_APPLICATION_KEY: ${{ secrets.OVH_APPLICATION_KEY }} | |
OVH_APPLICATION_SECRET: ${{ secrets.OVH_APPLICATION_SECRET }} | |
OVH_CONSUMER_KEY: ${{ secrets.OVH_CONSUMER_KEY }} | |
OVH_SSH_KEY_ID: ${{ secrets.OVH_SSH_KEY_ID }} | |
OVH_SERVICE_NAME: ${{ secrets.OVH_SERVICE_NAME }} | |
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} | |
INSTANCE_NAME_SUFFIX: ${{ inputs.instanceNameSuffix }} |