Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/clean-old-action-runs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/github-script@v8
with:
script: |
script: |
const KEEP_RUNS = 10
const KEEP_ARTIFACTS = 10
const KEEP_CACHES = 10
Expand Down Expand Up @@ -51,18 +51,18 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
})
})
}

core.info('Fetching caches...')
const caches = await github.paginate(
github.rest.actions.getActionsCacheList,
{ owner: context.repo.owner, repo: context.repo.repo, per_page: 100 }
)

core.info(`Total caches: ${caches.length}`)
core.info(`Keeping newest ${KEEP_CACHES}, deleting ${Math.max(caches.length - KEEP_CACHES, 0)}`)

for (const [i, cache] of caches.slice(KEEP_CACHES).entries()) {
core.info(`Deleting cache ${i + 1}/${caches.length - KEEP_CACHES} (id=${cache.id})`)
await github.rest.actions.deleteActionsCacheById({
Expand All @@ -71,4 +71,4 @@ jobs:
cache_id: cache.id,
})
}
core.info('Cleanup complete')
core.info('Cleanup complete')
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class m251103_122602_add_suspended_url_route extends Migration
*/
public function safeUp()
{
$this->upsert('url_route', ['source' => 'suspended', 'destination' => 'site/suspendend', 'weight' => 600],true);
$this->upsert('url_route', ['source' => 'suspended', 'destination' => 'site/suspended', 'weight' => 600],true);
}

/**
Expand Down