Skip to content

Choose a tag to compare

@neilpang neilpang released this 03 Oct 08:08
· 26 commits to main since this release

Optional key suffix for the cache-after-prepare cache

New input cache-after-prepare-key-suffix: an optional value that is
appended as-is to the cache key of the image cached after prepare.
Changing it discards that cache and runs prepare again, without
editing prepare itself. Requested in
#167

Usage

  - uses: actions/checkout@v7
  - uses: vmactions/freebsd-vm@v1
    with:
      cache-after-prepare: true
      cache-after-prepare-key-suffix: deps-${{ hashFiles('deps.sh') }}
      prepare: |
        sh deps.sh

  • The input is optional and empty by default. Left out, every cache
    key stays the same as in v1.5.8, so existing caches stay valid.
  • The prepare script and the sync method are still part of the key;
    the suffix is only added at the end.
  • hashFiles() is evaluated on the runner, relative to the workspace,
    so check out first. It returns an empty string when no file
    matches, and the key then no longer follows the file.

Pins

BUILDER_VERSION 2.2.8 (unchanged)
ANYVM_VERSION 0.7.2 (unchanged)