mirror of
https://github.com/appwrite/appwrite
synced 2026-04-21 21:47:16 +00:00
- Add COMPOSE_FILE=docker-compose.yml to tests, benchmark, and sdk-preview to prevent loading overrides in CI - Add target: development to tests/benchmark builds, target: production to pr-scan/nightly builds - Bump actions/checkout v4→v6, docker/build-push-action v4/v5→v6, actions/upload-artifact v4→v6, actions/github-script v7→v8 - Pin composer images to 2.8 in linter and static-analysis workflows Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
39 lines
No EOL
963 B
YAML
39 lines
No EOL
963 B
YAML
name: Cleanup Cache
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- closed
|
|
|
|
jobs:
|
|
cleanup:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Cleanup
|
|
run: |
|
|
gh extension install actions/gh-actions-cache
|
|
|
|
REPO=${{ github.repository }}
|
|
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
|
|
|
|
while true
|
|
do
|
|
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
|
|
|
|
if [ -z "$cacheKeysForPR" ]
|
|
then
|
|
break
|
|
fi
|
|
|
|
## Setting this to not fail the workflow while deleting cache keys.
|
|
set +e
|
|
for cacheKey in $cacheKeysForPR
|
|
do
|
|
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
|
|
done
|
|
done
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |