Run github action step unconditionally

Hi,
I have a github action with a job which contains the following steps:

  1. build the code
  2. upload the build log.

The problem is that if step 1 fails, then step 2 doesn’t run, so I can’t see the build log!

What’s the correct approach?

Thanks,
Jeff

Add an always() condition to step 2:

- name: upload build log
  if: ${{ always() }}
  # ...
1 Like