@@ -58,10 +58,11 @@ jobs:
58
58
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
59
59
with :
60
60
persist-credentials : false
61
- - name : Cache packages
61
+ - name : Attempt to restore dependencies cache
62
62
id : cache-packages
63
63
timeout-minutes : 4
64
- uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
64
+ continue-on-error : true
65
+ uses : actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
65
66
with :
66
67
path : ~/Library/Developer/Xcode/DerivedData/Amplify
67
68
key : amplify-packages-${{ hashFiles('Package.resolved') }}
76
77
xcode_path : ' /Applications/Xcode_14.3.app'
77
78
disable_package_resolution : ${{ steps.cache-packages.outputs.cache-hit }}
78
79
other_flags : ' -derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
80
+ - name : Save the dependencies cache if necessary
81
+ if : steps.cache-packages.outputs.cache-hit != 'true' && github.ref_name == 'main'
82
+ uses : actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
83
+ with :
84
+ path : ~/Library/Developer/Xcode/DerivedData/Amplify
85
+ key : ${{ steps.cache-packages.outputs.cache-primary-key }}
79
86
80
87
build-amplify-swift-tvOS :
81
88
runs-on : macos-13
@@ -84,10 +91,11 @@ jobs:
84
91
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
85
92
with :
86
93
persist-credentials : false
87
- - name : Cache packages
94
+ - name : Attempt to restore dependencies cache
88
95
timeout-minutes : 4
89
96
id : cache-packages
90
- uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
97
+ continue-on-error : true
98
+ uses : actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
91
99
with :
92
100
path : ~/Library/Developer/Xcode/DerivedData/Amplify
93
101
key : amplify-packages-${{ hashFiles('Package.resolved') }}
@@ -102,6 +110,12 @@ jobs:
102
110
xcode_path : ' /Applications/Xcode_14.3.app'
103
111
disable_package_resolution : ${{ steps.cache-packages.outputs.cache-hit }}
104
112
other_flags : ' -derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
113
+ - name : Save the dependencies cache if necessary
114
+ if : steps.cache-packages.outputs.cache-hit != 'true' && github.ref_name == 'main'
115
+ uses : actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
116
+ with :
117
+ path : ~/Library/Developer/Xcode/DerivedData/Amplify
118
+ key : ${{ steps.cache-packages.outputs.cache-primary-key }}
105
119
106
120
build-amplify-swift-watchOS :
107
121
runs-on : macos-13
@@ -110,10 +124,11 @@ jobs:
110
124
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
111
125
with :
112
126
persist-credentials : false
113
- - name : Cache packages
127
+ - name : Attempt to restore dependencies cache
114
128
id : cache-packages
115
129
timeout-minutes : 4
116
- uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
130
+ continue-on-error : true
131
+ uses : actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
117
132
with :
118
133
path : ~/Library/Developer/Xcode/DerivedData/Amplify
119
134
key : amplify-packages-${{ hashFiles('Package.resolved') }}
@@ -128,6 +143,12 @@ jobs:
128
143
xcode_path : ' /Applications/Xcode_14.3.app'
129
144
disable_package_resolution : ${{ steps.cache-packages.outputs.cache-hit }}
130
145
other_flags : ' -derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
146
+ - name : Save the dependencies cache if necessary
147
+ if : steps.cache-packages.outputs.cache-hit != 'true' && github.ref_name == 'main'
148
+ uses : actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
149
+ with :
150
+ path : ~/Library/Developer/Xcode/DerivedData/Amplify
151
+ key : ${{ steps.cache-packages.outputs.cache-primary-key }}
131
152
132
153
confirm-pass :
133
154
runs-on : ubuntu-latest
0 commit comments