File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -137,16 +137,21 @@ runs:
137137 REPO : " ${{ github.repository }}"
138138 STASH_DIR : " ${{ steps.mung.outputs.stash_path }}"
139139 run : |
140- gh run download $STASH_RUN_ID --name $STASH_NAME --dir "$STASH_DIR" -R "$REPO"
141- echo "Succesfully restored stash $STASH_NAME."
140+ # Catch errors in the download with || to avoid the whole workflow failing
141+ # when the download times out
142+ gh run download "$STASH_RUN_ID" \
143+ --name "$STASH_NAME" \
144+ --dir "$STASH_DIR" \
145+ -R "$REPO" || download="failed" && download="success"
142146
147+ echo "download=$download" >> "$GITHUB_OUTPUT"
143148
144149 - name : Set stash-hit Output
145150 id : output
146- if : ${{ ! cancelled() && steps.check-deps.conclusion == 'success' }}
151+ if : ${{ ! cancelled() && steps.check-deps.conclusion == 'success'}}
147152 shell : bash
148153 run : |
149- if [ "${{ steps.download.conclusion }}" == "success" ]; then
154+ if [ "${{ steps.download.outputs.download }}" == "success" ]; then
150155 echo "stash-hit=true" >> $GITHUB_OUTPUT
151156 else
152157 echo "stash-hit=false" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments