Skip to content

Commit

Permalink
feat: cronjob to remove old rdev stacks (#4008)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeyheath authored Jan 19, 2023
1 parent 4810f75 commit 36a28ce
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/clean_happy_rdev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Clean up stale happy stacks every hour

on:
schedule:
# Runs "every 55th minute" (see https://crontab.guru)
- cron: "55 * * * *"
jobs:
build:
name: Clean happy stacks
runs-on: ubuntu-20.04
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 900
role-session-name: HappyCleanupSingleCellDPRdevStacks
- name: Clean up stale happy stacks
uses: chanzuckerberg/github-actions/.github/actions/happy-cleanup@happy-cleanup-v1.1.0
with:
tfe_token: ${{secrets.TFE_TOKEN}}
# the default stale period to delete a stack is 2 weeks
# override like this:
#time: 3 weeks
#time: 2 days

0 comments on commit 36a28ce

Please sign in to comment.