Start Scaleway #93
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: Start 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: '00 07 * * *' | |
jobs: | |
up: | |
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: start 1 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=1 ${{ env.CONTAINER_ID }} |