From df28d9148d736804ea24abcae840181083e3f090 Mon Sep 17 00:00:00 2001 From: Ryu Sato Date: Sat, 4 May 2024 17:07:49 +0900 Subject: [PATCH] add repo name --- .github/workflows/misc-remove_cache.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/misc-remove_cache.yaml b/.github/workflows/misc-remove_cache.yaml index e3e7820d..b01b9ebc 100644 --- a/.github/workflows/misc-remove_cache.yaml +++ b/.github/workflows/misc-remove_cache.yaml @@ -15,8 +15,8 @@ jobs: steps: # remove cache older than 1 hour ago - run: - for ID in $(gh cache list --json id,createdAt | jq ".[].createdAt |= (sub(\"\\\\..*Z\";\"Z\") | fromdateiso8601 < `expr $(date +%s) - 60 \* 60`)" | jq -r '.[].id'); - do gh cache delete $ID; + for ID in $(gh cache list --repo ${{ github.repository }} --json id,createdAt | jq ".[].createdAt |= (sub(\"\\\\..*Z\";\"Z\") | fromdateiso8601 < `expr $(date +%s) - 60 \* 60`)" | jq -r '.[].id'); + do gh cache delete --repo ${{ github.repository }} $ID; done env: GH_TOKEN: ${{ github.token }}