Skip to content

Commit

Permalink
action: update aws cleanup action
Browse files Browse the repository at this point in the history
Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
  • Loading branch information
iamniting committed Jun 7, 2024
1 parent c15325c commit 113ebd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/aws-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: aws-cleanup
on:
workflow_dispatch:
schedule:
- cron: '*/5 * * * *'
- cron: '0 * * * *'

jobs:
cleanup:
Expand All @@ -21,13 +21,8 @@ jobs:
with:
version: 2

- name: setup aws cli
- name: run cleanup script
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
- name: run cleanup script
run: hack/aws-cleanup.sh
2 changes: 2 additions & 0 deletions hack/aws-cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

# Calculate age in hours from given time
calculate_age() {
local launch_time=$1
Expand Down

0 comments on commit 113ebd2

Please sign in to comment.