From 1b5ebd44d279f1069d799e0e6ddceeda738ca2b8 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Mon, 15 Jul 2024 19:42:54 +0530 Subject: [PATCH] fix: proper manifest discovery logic for caching --- action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c72f144..51ce317 100644 --- a/action.yml +++ b/action.yml @@ -40,6 +40,12 @@ runs: EOF shell: bash + + - name: Discover manifest file + id: manifest + run: echo "path=$(find ${{ inputs.path }} -maxdepth 1 -name "rokit.toml" -o -name "aftman.toml" -o -name "foreman.toml")" >> $GITHUB_OUTPUT + shell: bash + - name: Cache binaries if: ${{ inputs.cache == true || inputs.cache == 'true' }} uses: actions/cache@v4 @@ -47,7 +53,7 @@ runs: path: | ~/.rokit/bin ~/.rokit/tool-storage - key: ${{ runner.os }}-rokit-${{hashFiles(format('{0}/{1}', inputs.path, '{aftman,foreman,rokit}.toml'))}} + key: ${{ runner.os }}-rokit-${{hashFiles(format('{0}/{1}', inputs.path, '${{ steps.manifest.outputs.path }}'))}} - name: Install tools run: |