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.
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:
release: types: [published]
for production deployments rather than building on every branch pushtype=edge,branch=master
instead of type=ref,event=branch
and avoid unnecessary tags like type=sha
or type=ref,event=pr
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.
Enter the URL of a public GitHub repository