From f184f22a4ffd2c3500e26c66accba2f36059dfc3 Mon Sep 17 00:00:00 2001 From: nkhanh44 Date: Tue, 16 Jan 2024 16:23:18 +0700 Subject: [PATCH 1/3] [#524] Add clean up workflow --- .github/workflows/cleanup_cache.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/cleanup_cache.yml diff --git a/.github/workflows/cleanup_cache.yml b/.github/workflows/cleanup_cache.yml new file mode 100644 index 00000000..a764e55d --- /dev/null +++ b/.github/workflows/cleanup_cache.yml @@ -0,0 +1,33 @@ +name: Cleanup Cache +on: + pull_request: + types: + - closed + +jobs: + cleanup_cache: + runs-on: macOS-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Cleanup + run: | + gh extension install actions/gh-actions-cache + + REPO=${{ github.repository }} + BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" + + echo "Fetching list of cache key" + cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) + + ## Setting this to not fail the workflow while deleting cache keys. + set +e + echo "Deleting caches..." + for cacheKey in $cacheKeysForPR + do + gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm + done + echo "Done" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1dd16c805b867c99cf12e2cbe20aedd074bc74a4 Mon Sep 17 00:00:00 2001 From: nkhanh44 Date: Mon, 24 Jun 2024 15:46:46 +0700 Subject: [PATCH 2/3] [#524] Fix Ci failed --- fastlane/Constants/Constant.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Constants/Constant.swift b/fastlane/Constants/Constant.swift index 110dde40..b5af203a 100644 --- a/fastlane/Constants/Constant.swift +++ b/fastlane/Constants/Constant.swift @@ -74,7 +74,7 @@ enum Constant { // MARK: - Device - static let devices = ["iPhone 12 Pro Max"] + static let devices = ["iPhone 15 Pro Max"] } extension Constant { From 7102bcc54fc215f53eea4de776c8a8540dfa4aca Mon Sep 17 00:00:00 2001 From: nkhanh44 Date: Mon, 24 Jun 2024 16:11:33 +0700 Subject: [PATCH 3/3] [#524] Update macOS-latest and device version --- .github/workflows/test_swiftui_install_script.yml | 2 +- fastlane/Constants/Constant.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_swiftui_install_script.yml b/.github/workflows/test_swiftui_install_script.yml index bded91e1..f9566740 100644 --- a/.github/workflows/test_swiftui_install_script.yml +++ b/.github/workflows/test_swiftui_install_script.yml @@ -11,7 +11,7 @@ concurrency: jobs: Test: name: Test - runs-on: macOS-12 + runs-on: macOS-latest steps: - uses: actions/checkout@v3 diff --git a/fastlane/Constants/Constant.swift b/fastlane/Constants/Constant.swift index b5af203a..6c47444c 100644 --- a/fastlane/Constants/Constant.swift +++ b/fastlane/Constants/Constant.swift @@ -74,7 +74,7 @@ enum Constant { // MARK: - Device - static let devices = ["iPhone 15 Pro Max"] + static let devices = ["iPhone 15 Pro"] } extension Constant {