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 }} 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 110dde40..6c47444c 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"] } extension Constant {