Skip to content

Commit 08adf86

Browse files
anomiexmatticbot
authored andcommitted
rolling-releases: Keep releases up to one day old (#46980)
Per request, we want to keep older rolling releases up to 1 day old. Note the cleanup still only happens when a new release is made, so if no new releases come in then old ones over a day old might still remain until a new one does happen. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/21722333056 Upstream-Ref: Automattic/jetpack@4508551
1 parent 754f7a9 commit 08adf86

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/files/autorelease.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ fi
127127
if [[ -n "$ROLLING_MODE" ]]; then
128128
echo "::group::Deleting stale rolling release"
129129

130-
for R in $( gh release list --limit 100 --json tagName --jq '.[].tagName | select( contains( "+rolling" ) )' ); do
130+
for R in $( gh release list --limit 1000000 --json tagName,publishedAt --jq '.[] | select( ( .tagName | contains( "+rolling" ) ) and ( .publishedAt | fromdateiso8601 < now - 86400 ) ) | .tagName' ); do
131131
echo "Found $R, deleting"
132132
gh release delete "$R" --cleanup-tag --yes
133133
done

0 commit comments

Comments
 (0)