File tree Expand file tree Collapse file tree 4 files changed +62
-1
lines changed Expand file tree Collapse file tree 4 files changed +62
-1
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,22 @@ jobs:
34
34
run : |
35
35
mkdir -p zip_output_dir
36
36
sh -x scripts/build_zip.sh zip_output_dir
37
-
38
37
- uses : actions/upload-artifact@v1
39
38
with :
40
39
name : Firebase-actions-dir
41
40
# Zip the entire output directory since the builder adds subdirectories we don't know the
42
41
# name of.
43
42
path : zip_output_dir
43
+ - name : Install gcloud tool
44
+ if : ${{ always() }}
45
+ run : scripts/install_gcloud.sh
46
+ - name : Access gcloud account
47
+ if : ${{ always() }}
48
+ run : |
49
+ scripts/decrypt_gha_secret.sh scripts/gha-encrypted/firebase-ios-testing.json.gpg firebase-ios-testing.json "$gcs_key"
50
+ gcloud auth activate-service-account --key-file firebase-ios-testing.json
51
+ - name : Update commit hash on GCS if any previous steps failed
52
+ if : ${{ failure() }}
53
+ run : scripts/upload_to_gcs.sh "${GITHUB_SHA}" "Fail"
54
+ - name : Upload zip file to GCS
55
+ run : scripts/upload_to_gcs.sh "${GITHUB_SHA}" "zip_output_dir"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ curl https://sdk.cloud.google.com > install.sh
18
+ bash install.sh --disable-prompts
19
+ echo " ::add-path::${HOME} /google-cloud-sdk/bin/"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Copyright 2020 Google LLC
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+
14
+ set -x
15
+ GITHUB_HASH=" $1 "
16
+ FRAMEWORK_DIR=" $2 "
17
+ if [[ " ${FRAMEWORK_DIR} " == " Fail" ]]
18
+ then
19
+ echo " Zip build or gcloud setup might be failed."
20
+ echo " The last zip workflow failed. Commit hash: ${GITHUB_HASH} " > latest_commit_hash.txt
21
+ gsutil cp latest_commit_hash.txt " gs://ios-framework-zip/latest_commit_hash.txt"
22
+ else
23
+ echo " Commit Hash: ${GITHUB_HASH} "
24
+ zip -r Firebase-actions-dir.zip " ${FRAMEWORK_DIR} "
25
+ gsutil cp Firebase-actions-dir.zip " gs://ios-framework-zip/Firebase-actions-dir-${GITHUB_HASH} .zip"
26
+ # Keep the commit hash, and so SDK testing can load latest zip based on the commit hash.
27
+ touch latest_commit_hash.txt
28
+ echo " ${GITHUB_HASH} " > latest_commit_hash.txt
29
+ gsutil cp latest_commit_hash.txt " gs://ios-framework-zip/latest_commit_hash.txt"
30
+ fi
You can’t perform that action at this time.
0 commit comments