-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: cronjob to remove old rdev stacks (#4008)
- Loading branch information
1 parent
4810f75
commit 36a28ce
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
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 |