Skip to content

Cache contains all packages if used multiple times #94

@pascallj

Description

@pascallj

In some workflows I only need a subset of packages while in others I need the full suite. So in order to only install the minimum amount of packages I used the action twice in one job. However if this job misses the cache and is the first one to save, both the keys will contain all installed packages.

For example, in one run I might need:

- uses: awalsh128/cache-apt-pkgs-action@v1
  with:
    packages: foo bar

while in another I need:

- uses: awalsh128/cache-apt-pkgs-action@v1
  with:
    packages: foo bar
- uses: awalsh128/cache-apt-pkgs-action@v1
  with:
    packages: baz

If the latter runs first and caches the packages then the cache now contains all (foo, bar and baz) packages under two different keys.

So even if I only need foo and bar, baz will also be installed.

Is this intended behavior?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions