Let’s Get Certified
Module 15 / 15 · Security and efficiency

Reduce CI minutes without losing release evidence

Use cache keys, artifact retention, queue measurements and safe concurrency boundaries to reduce waste.

Five pushes, one useful preview

CI needs only the newest preview for a feature branch, but all approved release builds must finish. How should the workflows use concurrency?

Work through the decision

Use a concurrency group that distinguishes the workflow and feature branch and cancel superseded preview runs. Keep release work outside that cancellation group. Inspect canceled validation and completed release records to confirm that the scope matches the intent.

Budget cache space and retention

Include the compatibility inputs such as OS, runtime and lockfile digest in a dependency cache key. Keep release evidence as artifacts with a retention period suited to review. Use the REST API to inventory storage before deleting by age or ID.

For an inventory, GET /repos/{owner}/{repo}/actions/artifacts returns artifact IDs and expiry metadata. Review IDs, ages and retention obligations before selecting any for deletion. Set retention-days on uploads within the effective account limits. A cache eviction calls for reinstalling dependencies, while an expired artifact may require recreating review evidence.

Actions artifact REST API

Scale the work that matters

Measure queue delay separately from execution duration. Use concurrency groups to cancel superseded validation runs when safe, cap large matrices during peak load, and cache expensive stable inputs. Protect mandatory release builds and evidence from aggressive cancellation.

A cache hit resurrects the wrong dependencies

A Linux and a Windows build share an overly broad cache key. A lockfile update then restores stale tools. What inputs should distinguish the cache, and how do you check the fix?

Check your reasoning

Include platform, relevant runtime and lockfile digest. Restore using a compatible policy and let the package manager verify the lockfile. Test one cache miss, a repeat hit and a changed lockfile. Keep the release binary as a separately identified artifact.

GitHub documentation · GH-200 skills outline

Continue in GitHub Foundations. Track a release across repositories.

Knowledge check

Reduce CI minutes without losing release evidence quiz

Answer 5 questions. Check each answer for an explanation.