File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,18 +136,47 @@ jobs:
136136 with :
137137 path : ~/artifacts
138138
139+ - uses : geekyeggo/delete-artifact@v2
140+ with :
141+ name : ' *'
142+
143+ # - name: Cleanup
144+ # run: |
145+ # gh extension install actions/gh-actions-cache
146+
147+ # REPO=${{ github.repository }}
148+ # BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
149+
150+ # echo "Fetching list of cache key"
151+ # cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
152+
153+ # ## Setting this to not fail the workflow while deleting cache keys.
154+ # set +e
155+ # echo "Deleting caches..."
156+ # for cacheKey in $cacheKeysForPR
157+ # do
158+ # gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
159+ # done
160+ # echo "Done"
161+ # env:
162+ # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163+
139164 - name : " ✔️ list Caches"
140165 run : |
141166 curl \
142167 -H "Accept: application/vnd.github.v3+json" \
143168 -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
144169 https://api.github.com/repos/$GITHUB_REPOSITORY/actions/caches
145170
146- - uses : geekyeggo/delete-artifact@v2
147- with :
148- name : ' *'
149171 - uses : snnaplab/delete-branch-cache-action@v1
150172
173+ - name : " ✔️ list Caches"
174+ run : |
175+ curl \
176+ -H "Accept: application/vnd.github.v3+json" \
177+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
178+ https://api.github.com/repos/$GITHUB_REPOSITORY/actions/caches
179+
151180 - name : " ✔️ ls"
152181 run : |
153182 pwd
You can’t perform that action at this time.
0 commit comments