fix: add extrinsic to overrride storage values #484
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cleanup caches after PR closed | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
cleanup: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Cleanup | |
run: | | |
gh extension install actions/gh-actions-cache | |
REPO=${{ github.repository }} | |
BRANCH=${{ github.head_ref }} | |
if [ -z "$BRANCH" ]; then | |
echo "Branch is empty, quit now" | |
exit 0 | |
fi | |
# BRANCH doesn't necessarily have a cache | |
cacheKeysForPR=$(gh actions-cache list -R $REPO | cut -f 1 | grep "$BRANCH" || true) | |
echo "Deleting caches after PR closed for branch $BRANCH ..." | |
for cacheKey in $cacheKeysForPR | |
do | |
echo " Delete cache: $cacheKey" | |
gh actions-cache delete $cacheKey -R $REPO --confirm || true | |
done | |
echo "Done" | |
env: | |
GH_TOKEN: ${{ github.token }} |