Newsletter
TechAnV Blog
Get updates on security engineering, Rust, eBPF, and DevSecOps. No spam, unsubscribe anytime.
Check your inbox and click the confirmation link to complete your subscription.
Skipping a GitHub Actions step without failing#
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: true does exactly that:
1 - name: Download previous database2 run: curl --fail -o tils.db https://til.simonwillison.net/tils.db3 continue-on-error: true4 - name: Build database5 run: python build_database.pyI’m using curl --fail here which returns an error code if the file download files (without --fail it was writing out a two line error message to a file called tils.db which is not what I wanted). Then continue-on-error: true to keep on going even if the download failed.
My build_database.py script updates the tils.db database file if it exists and creates it from scratch if it doesn’t.
Newsletter
TechAnV Blog
Get updates on security engineering, Rust, eBPF, and DevSecOps. No spam, unsubscribe anytime.
Check your inbox and click the confirmation link to complete your subscription.