fix: proper manifest discovery logic for caching

This commit is contained in:
Erica Marigold 2024-07-15 19:42:54 +05:30
parent 5f353a0adc
commit 1b5ebd44d2
No known key found for this signature in database
GPG key ID: 2768CC0C23D245D1

View file

@ -40,6 +40,12 @@ runs:
EOF EOF
shell: bash 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 - name: Cache binaries
if: ${{ inputs.cache == true || inputs.cache == 'true' }} if: ${{ inputs.cache == true || inputs.cache == 'true' }}
uses: actions/cache@v4 uses: actions/cache@v4
@ -47,7 +53,7 @@ runs:
path: | path: |
~/.rokit/bin ~/.rokit/bin
~/.rokit/tool-storage ~/.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 - name: Install tools
run: | run: |