You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I have the following entry in GitHub Actions:
- name: Cache some heavy libraryuses: actions/cache@v3id: cachewith:
key: ${{ runner.OS }}-cache-${{ hashFiles('.github/workflows/build.yml') }}path: C:/mylib
- name: Build some heavy library (if cache not found)if: steps.cache.outputs.cache-hit != 'true'run: | curl.exe -L https://some-link.com/to-the-library-src -o src-lib.zip tar -xf src-lib.zip -C C:\mylib command-1 command-2 command-3
I found that if: steps.cache.outputs.cache-hit != 'true' line makes the step run even if some of its command fails. This leads to massive time wasted on running the next commands even if some of them already failed. continue-on-error: false doesn't help in this case.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Let's say I have the following entry in GitHub Actions:
I found that
if: steps.cache.outputs.cache-hit != 'true'
line makes the step run even if some of its command fails. This leads to massive time wasted on running the next commands even if some of them already failed.continue-on-error: false
doesn't help in this case.How do you handle it in an elegant way?
Beta Was this translation helpful? Give feedback.
All reactions