Loading tutorials
actions/cache syntax. This chapter covers the reasoning: what a cache saves, what it can't save, and how to tell whether6 min readactions/cache action works: its inputs, its outputs, and when it saves. It assumes you can read a workflow file, know how jobs, steps, and runners relate, and have used a package manager such as npm or pip in CI. Key design, restore keys, and eviction get their own chap5 min readactions/cache uses to look up a saved cache. If the key is too stable, jobs restore stale dependencies. If it changes on every run, jobs never get a hit. hashFiles lets you build a key that changes exactly when your dependency inputs change.5 min readactions/cache with a key built from hashFiles. It covers what happens when that exact key does not exist yet. A fallback list called restore-keys lets the job start from an older cache instead of from nothing.6 min readactions/cache does with path, key, and restore-keys. You should also know how hashFiles builds a key from a lock file. The earlier chapters covered those. Here you will see how the same mechanism is available through a single 5 min readstrategy.matrix turns one job definition into many jobs. It assumes you can read a workflow file and already know what jobs, steps, and runs-on do. It also assumes you can add a file under .github/workflows. Caching comes back in a later chapter. Here the focus is h6 min readstrategy.matrix expands variables into jobs, and have used ${{ matrix.* }} expressions in a job. Here you will learn how exclude removes combinations, how include adds variables or whole jobs, and the order in which GitHub Actions a5 min readactions/cache builds keys with hashFiles. It also assumes you know how strategy.matrix expands into jobs. Here you combine the two so that each matrix job saves and restores the right cache.5 min readstrategy.matrix expands into jobs, including include and exclude. It covers the two settings that control how those jobs run together: fail-fast and max-parallel. It also covers how they interact with caching.6 min readactions/cache, build a key with hashFiles, and use restore-keys. Those topics are covered in earl6 min readactions/cache or the cache option of actions/setup-node, and that you know how matrix jobs expand. Both caches and artifacts store files outside the runner, so they look interchangeable at 5 min readactions/cache to a workflow, build a key with hashFiles, and use restore-keys. It also assumes you know the scope and eviction rules from the previous chapter. Here you learn to tell whether a cache was used, read the evidence in the logs, and find the 6 min readactions/cache with a key built from hashFiles. It also assumes you know how restore-keys fall back to a partial match, and you understand that a cache entry can't be changed after it is created. Here you will learn when to replace5 min readstrategy.matrix, include and exclude, and cache keys from earlier chapters. You should also be comfortable with needs and basic shell scripting. The shell examples use jq, which is preinstalled on GitHub5 min read