I wanted to have a GitHub Action step run that might fail, but if it failed the rest of the steps should still execute and the overall run should be treated as a success.
continue-on-error: truedoes exactly that:
- name: Download previous database run: curl --fail -o tils.db https://til.simonwillison.net/tils.db continue-on-error: true - name: Build database run: python build_database.py
curl --failhere which returns an error code if the file download files (without
--failit was writing out a two line error message to a file called
tils.dbwhich is not what I wanted). Then
continue-on-error: trueto keep on going even if the download failed.