Skip to content

Delete instance

Delete instance #95

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 }}
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID}}
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY}}
S3_ENDPOINT_URL: ${{ vars.S3_ENDPOINT_URL }}
S3_MODEL_PATH: "distilgpt2"
INSTANCE_NAME_SUFFIX: ${{ inputs.instanceNameSuffix }}