When writing CI/CD workflow configurations, always use explicit and precise conditions, paths, and selectors to ensure that actions only execute when necessary and operate on the exact intended targets. This prevents wasted compute resources, unintended side effects, and improves workflow reliability.
When writing CI/CD workflow configurations, always use explicit and precise conditions, paths, and selectors to ensure that actions only execute when necessary and operate on the exact intended targets. This prevents wasted compute resources, unintended side effects, and improves workflow reliability.
For file paths in artifact uploads or processing steps, specify exact patterns instead of entire directories:
# Instead of this (too broad):
path: .testoutput
# Use this (precise):
path: ./.testoutput/junit.*.xml
For conditional execution, include all necessary checks to ensure steps only run when appropriate:
# Instead of this (missing check):
if: $
# Use this (complete check):
if: $
This practice reduces CI resource usage, prevents accidental inclusion of unwanted files in artifacts, and makes debugging workflow issues significantly easier.
Enter the URL of a public GitHub repository