Design CI/CD workflows to minimize unnecessary resource consumption and provide faster feedback. Avoid triggering builds when changes don’t impact the build output, use appropriate event triggers, and implement clean artifact management strategies.

Key practices:

Example of efficient workflow triggers:

on:
  release:
    types: [published]  # Only build on actual releases
  push:
    branches: [master]
    paths-ignore: ['docs/**', '*.md']  # Skip builds for doc changes

This approach reduces CI costs, speeds up feedback loops, and prevents resource waste while maintaining necessary build coverage.