From 0d5ceb47864d17728a8cf5fe207d356ddc4772c6 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Wed, 16 Jul 2025 00:55:54 -0400 Subject: [PATCH] Added cache-hit output --- README.md | 6 ++++++ action.yml | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..bc18a23 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# uv-cache + +This is a very simple action that sets up cache support for `uv`. It doesn't do +anything else. It's assumed that `uv`, as well as all the dependencies for +`actions/cache@v4` are available in the container. I wrote this to work well +with [based-alpine](https://git.ficd.sh/ficd/based-alpine). diff --git a/action.yml b/action.yml index 4ab22f8..5d4dfb5 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,10 @@ name: Setup uv cache description: Composite action to determine uv cache dir and restore cache. author: Daniel Fichtinger +outputs: + uv-cache-hit: + description: "Whether the uv cache was restored" + value: ${{ steps.cache-restore.outputs.cache-hit }} runs: using: "composite" steps: @@ -10,6 +14,7 @@ runs: run: | echo "dir=$(uv cache dir)" >> "$GITHUB_OUTPUT" - name: Restore uv cache + id: cache-restoree uses: actions/cache@v4 with: path: ${{ steps.uv-cache.outputs.dir }}