Skip to content

Commit 7bf00ff

Browse files
authored
Merge pull request #554 from nimblehq/feature/524-add-workflow-to-clear-github-action-cache
[#524] Add workflow to clear GitHub action cache
2 parents 36cd772 + 7102bcc commit 7bf00ff

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

.github/workflows/cleanup_cache.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Cleanup Cache
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
7+
jobs:
8+
cleanup_cache:
9+
runs-on: macOS-latest
10+
steps:
11+
- name: Check out code
12+
uses: actions/checkout@v3
13+
14+
- name: Cleanup
15+
run: |
16+
gh extension install actions/gh-actions-cache
17+
18+
REPO=${{ github.repository }}
19+
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
20+
21+
echo "Fetching list of cache key"
22+
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
23+
24+
## Setting this to not fail the workflow while deleting cache keys.
25+
set +e
26+
echo "Deleting caches..."
27+
for cacheKey in $cacheKeysForPR
28+
do
29+
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
30+
done
31+
echo "Done"
32+
env:
33+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test_swiftui_install_script.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111
jobs:
1212
Test:
1313
name: Test
14-
runs-on: macOS-12
14+
runs-on: macOS-latest
1515
steps:
1616
- uses: actions/checkout@v3
1717

fastlane/Constants/Constant.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ enum Constant {
7474

7575
// MARK: - Device
7676

77-
static let devices = ["iPhone 12 Pro Max"]
77+
static let devices = ["iPhone 15 Pro"]
7878
}
7979

8080
extension Constant {

0 commit comments

Comments
 (0)