Skip to content

studios-heartbeat-staging #455

studios-heartbeat-staging

studios-heartbeat-staging #455

name: studios-heartbeat-staging
on:
workflow_dispatch:
inputs:
workspace_id:
type: string
description: Space separated list of workspace IDs
default: "215808445993459"
slack:
description: Whether to send a Slack message
type: boolean
required: false
default: true
schedule:
- cron: "0 2 * * *" # Runs at 2 AM UTC every day
env:
TOWER_API_ENDPOINT: ${{ secrets.STAGING_TOWER_ACCESS_ENDPOINT }}
jobs:
check-studios:
runs-on: ubuntu-latest
env:
TOWER_ACCESS_TOKEN: ${{ secrets.STAGING_TOWER_ACCESS_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
- name: setup python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # ratchet:actions/setup-python@v6.2.0
with:
python-version: "3.12"
cache: "pip"
- name: install dependencies
run: |
pip install -r requirements.txt
- name: install tw cli
run: |
set -euo pipefail
wget -L https://github.com/seqeralabs/tower-cli/releases/download/v0.31.0/tw-linux-x86_64
mv tw-* tw
chmod +x tw
sudo mv tw /usr/local/bin/
- name: tower check
run: |
tw --version
- name: check_studios
run: |
python studios_api_test.py \
-w ${{ github.event_name == 'workflow_dispatch' && inputs.workspace_id || '215808445993459' }} \
--slack_channel ${{ secrets.ENGINEERING_SLACK_CHANNEL }} \
${{ (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.slack)) && '--slack' || '' }}