Files
greptimedb/.github/workflows/aws-ec2-runner-janitor.yml
T
yihong db61aecadb ci: do not run these actions on fork (#9721)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
(cherry picked from commit 4684b95f72)
2026-10-23 14:43:10 +08:00

31 lines
913 B
YAML

name: AWS EC2 Runner Janitor
on:
schedule:
- cron: '23 3 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
sweep:
if: ${{ github.repository == 'GreptimeTeam/greptimedb' }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.EC2_RUNNER_REGION }}
- uses: astral-sh/setup-uv@v6
- name: Sweep expired CI instances and unregister runners
env:
AWS_REGION: ${{ vars.EC2_RUNNER_REGION }}
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
run: uv run .github/scripts/aws-ec2-runner-teardown.py --sweep