diff --git a/.github/actions/setup-ios/action.yml b/.github/actions/setup-ios/action.yml index 576334a7a4..082f39dc5e 100644 --- a/.github/actions/setup-ios/action.yml +++ b/.github/actions/setup-ios/action.yml @@ -8,10 +8,6 @@ inputs: google-cloud-storage-code-signing-certificates-key: description: 'gc_keys.json file base64 content for code signing APIs communication' required: false - cache-cocoapods-on-pods-cache-miss: - description: 'Should cache cocoapods on Pods cache miss' - required: false - default: false outputs: is-git-crypt-unlocked: @@ -111,16 +107,6 @@ runs: restore-keys: | ${{ runner.os }}-pods- - # Cache Cocoapods repository - - name: Cache Cocoapods - if: ${{ inputs.cache-cocoapods-on-pods-cache-miss == 'true' && steps.cache-pods.outputs.cache-hit != 'true' }} - uses: actions/cache@v3.0.11 - with: - path: ~/.cocoapods - key: ${{ runner.os }}-cocoapods-${{ hashFiles('iosHyperskillApp/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-cocoapods- - # Install Pods if cache miss occurred - name: Install Pods if: steps.cache-pods.outputs.cache-hit != 'true' diff --git a/.github/workflows/build_caches.yml b/.github/workflows/build_caches.yml new file mode 100644 index 0000000000..777ed7252b --- /dev/null +++ b/.github/workflows/build_caches.yml @@ -0,0 +1,60 @@ +name: Build Caches + +on: + push: + branches: + - 'develop' + workflow_dispatch: + # Runs at 00:00 UTC every sunday + schedule: + - cron: "0 0 * * 0" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }} + cancel-in-progress: false + +defaults: + run: + shell: bash + +jobs: + build-android: + name: Build Android Caches + runs-on: ubuntu-22.04 + timeout-minutes: 60 + + steps: + - name: Checkout + uses: actions/checkout@v3.3.0 + + - name: Setup CI + uses: ./.github/actions/setup-android + with: + setup-ruby: true + + - name: Clean + run: ./gradlew clean + env: + GITHUB_USER: ${{ github.actor }} + GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build-ios: + name: Build iOS Caches + runs-on: macos-12 + timeout-minutes: 60 + + steps: + - name: Checkout + uses: actions/checkout@v3.3.0 + + - name: Setup CI + id: setup + uses: ./.github/actions/setup-ios + with: + git-crypt-key: ${{ secrets.GIT_CRYPT_KEY }} + + - name: Clean + run: ./gradlew clean + env: + GITHUB_USER: ${{ github.actor }} + GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/ios_release_deployment.yml b/.github/workflows/ios_release_deployment.yml index c87df1b41f..3b70382828 100644 --- a/.github/workflows/ios_release_deployment.yml +++ b/.github/workflows/ios_release_deployment.yml @@ -41,7 +41,6 @@ jobs: id: setup uses: ./.github/actions/setup-ios with: - cache-cocoapods-on-pods-cache-miss: true git-crypt-key: ${{ secrets.GIT_CRYPT_KEY }} google-cloud-storage-code-signing-certificates-key: ${{ secrets.GOOGLE_CLOUD_STORAGE_CODE_SIGNING_CERTIFICATES_KEY_CONTENT }}