diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index c095f26d66e..69c82150927 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -13,10 +13,17 @@ on: # Run every day at midnight(PST) - cron uses UTC times - cron: '0 8 * * *' + workflow_dispatch: + inputs: + custom_spec_repos: + description: 'Custom Podspec repos' + required: true + default: 'https://cpdc-internal.git.corp.google.com/firebase.git' + jobs: build: # Don't run on private repo unless it is a PR. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' runs-on: macOS-latest steps: - uses: actions/checkout@v2 @@ -27,7 +34,7 @@ jobs: package: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: build runs-on: macOS-latest steps: @@ -37,7 +44,7 @@ jobs: - name: ZipBuildingTest run: | mkdir -p zip_output_dir - sh -x scripts/build_zip.sh zip_output_dir + sh -x scripts/build_zip.sh zip_output_dir "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}" - uses: actions/upload-artifact@v1 with: name: Firebase-actions-dir @@ -47,7 +54,7 @@ jobs: quickstart_framework_abtesting: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: package env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -92,7 +99,7 @@ jobs: quickstart_framework_auth: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: package env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -136,7 +143,7 @@ jobs: quickstart_framework_config: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: package env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -177,7 +184,7 @@ jobs: quickstart_framework_crashlytics: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: package env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -227,7 +234,7 @@ jobs: quickstart_framework_database: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: package env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -272,7 +279,7 @@ jobs: quickstart_framework_dynamiclinks: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: package env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -322,7 +329,7 @@ jobs: quickstart_framework_firestore: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: package env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -365,7 +372,7 @@ jobs: quickstart_framework_inappmessaging: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: package env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -411,7 +418,7 @@ jobs: quickstart_framework_messaging: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: package env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} @@ -456,7 +463,7 @@ jobs: quickstart_framework_storage: # Don't run on private repo. - if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk' + if: (github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk') || github.event_name == 'workflow_dispatch' needs: package env: plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} diff --git a/scripts/build_zip.sh b/scripts/build_zip.sh index 0a88416d5c0..b278632ad2e 100755 --- a/scripts/build_zip.sh +++ b/scripts/build_zip.sh @@ -14,9 +14,10 @@ set -x REPO=`pwd` -if [[ $# -lt 1 ]]; then - cat 1>&2 <&2 <