Skip to content

Commit 5d1fa67

Browse files
committed
Address feedback
1 parent 09578bc commit 5d1fa67

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/deleteOldReleases.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ name: Delete Old Releases
33
on:
44
schedule:
55
- cron: '0 10 * * *' # Daily at 10:00 UTC which is 2:00 AM PST (UTC-8)
6-
workflow_dispatch: # Manual trigger
7-
push:
6+
workflow_dispatch:
87

98
jobs:
10-
clean_releases:
9+
delete_release_assets:
1110
runs-on: ubuntu-latest
1211
steps:
13-
- name: Delete old releases
12+
- name: Delete old release assets
1413
# To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable
1514
env:
1615
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -19,12 +18,12 @@ jobs:
1918
run: |
2019
2120
# Define 60 days in seconds (60 * 24 * 60 * 60 = 5184000)
22-
SECONDS_60_DAYS=5184000
21+
60_DAYS_IN_SECONDS=5184000
2322
2423
# Store the list of asset ID and Name pairs in the variable
2524
# "ASSET_ID ASSET_NAME" on each line
2625
ASSETS_TO_DELETE=$(gh api --paginate repos/${{ github.repository }}/releases | \
27-
jq -r --argjson cutoff_seconds "$SECONDS_60_DAYS" '
26+
jq -r --argjson cutoff_seconds "$60_DAYS_IN_SECONDS" '
2827
# Calculate the 60-day cutoff as now minus 60 days
2928
. as $releases | (now - $cutoff_seconds) as $cutoff |
3029

0 commit comments

Comments
 (0)