Start instances for collecting data #12593
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 instances for collecting data | |
on: | |
schedule: | |
- cron: "*/15 * * * *" | |
# - cron: "13 * * * *" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
start-instances: | |
runs-on: ubuntu-latest | |
# runs-on: self-hosted | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
container: | |
image: ghcr.io/sparecores/sc-inspector:main | |
env: | |
GITHUB_TOKEN: ${{ secrets.INSPECTOR_TOKEN }} | |
PULUMI_BACKEND_URL: ${{ secrets.PULUMI_BACKEND_URL }} | |
BENCHMARK_SECRETS_PASSPHRASE: ${{ secrets.BENCHMARK_SECRETS_PASSPHRASE }} | |
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} | |
GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} | |
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} | |
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} | |
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} | |
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }} | |
UPCLOUD_USERNAME: ${{ secrets.UPCLOUD_USERNAME }} | |
UPCLOUD_PASSWORD: ${{ secrets.UPCLOUD_PASSWORD }} | |
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} | |
REPO_PATH: /repo/sc-inspector-data | |
volumes: | |
- ${{ github.workspace }}/sc-inspector-data:/repo/sc-inspector-data | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fetch-depth: 0 | |
path: sc-inspector-data | |
- name: configure aws credentials | |
uses: aws-actions/[email protected] | |
with: | |
role-to-assume: ${{ secrets.SC_RUNNER_ROLE_ARN }} | |
role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
# 4 hours to avoid expiring tokens | |
role-duration-seconds: 14400 | |
aws-region: us-east-1 | |
- name: inspector | |
run: python /inspector/inspector.py start | |
#--start-only aws t3.nano --start-only aws c7a.4xlarge --start-only aws c7g.2xlarge | |
# --start-only aws c7i.48xlarge --start-only aws c7i.metal-48xl |