Skip to content

Quota Check

Quota Check #230

Workflow file for this run

name: Quota Check
permissions:
contents: read
on:
schedule:
- cron: "0 15 * * *"
# Allow manual triggering for testing
workflow_dispatch:
jobs:
quota-check:
environment: operations
name: Check quota usage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
name: Checkout code
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
- name: Setup Go
uses: ./.github/actions/setup-go
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build CLI
working-directory: ./go
run: |
go build -o unkey .
- name: Run quota check
working-directory: ./go
env:
CLICKHOUSE_URL: ${{ secrets.CLICKHOUSE_URL }}
DATABASE_DSN: ${{ secrets.DATABASE_DSN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
run: |
./unkey quotacheck
- name: Send Heartbeat
run: curl ${{ secrets.QUOTA_CHECK_HEARTBEAT_URL }}