Skip to content

Stop Scaleway

Stop Scaleway #129

Workflow file for this run

name: Stop Scaleway
on:
workflow_dispatch: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
schedule: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: '36 21 * * *'
jobs:
down:
runs-on: ubuntu-latest
steps:
- name: Use CLI
uses: jawher/[email protected]
env:
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
SCW_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }}
SCW_ZONE: ${{ secrets.SCW_ZONE }}
with:
args: container container list name=${{ secrets.CONTAINER_NAME }} --output json
- name: Get CONTAINER_ID env var
run: echo "CONTAINER_ID=$(cat "${GITHUB_WORKSPACE}/scw.output" | jq -r '.[0].id')" >> $GITHUB_ENV
- name: 0 instances
uses: jawher/[email protected]
env:
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
SCW_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }}
SCW_ZONE: ${{ secrets.SCW_ZONE }}
with:
args: container container update min-scale=0 ${{ env.CONTAINER_ID }}