Skip to content

Commit

Permalink
Scratch hashFiles, does not work for file in composite action path
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Mar 16, 2023
1 parent b33cf99 commit bb61605
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions composite/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ runs:
echo '##[endgroup]'
shell: bash

- name: Configure
id: config
- name: Detect OS
id: os
run: |
case "$RUNNER_OS" in
Linux*)
Expand All @@ -173,20 +173,6 @@ runs:
echo "pip-cache=~\\AppData\\Local\\pip\\Cache" >> $GITHUB_OUTPUT
;;
esac
echo "action-path=$(cd "$GITHUB_ACTION_PATH"; cd ..; pwd)" >> $GITHUB_OUTPUT
find "$GITHUB_ACTION_PATH/.."
touch file
env
shell: bash

- name: Ls hashed files
run: |
ls -lah "${{ format('{0}/python/requirements.txt', steps.config.outputs.action-path) }}"
ls -lah "${{ format('{0}/composite/action.yml', steps.config.outputs.action-path) }}"
ls -lah '/home/runner/work/_actions/EnricoMi/publish-unit-test-result-action/branch-composite-cache-pip-packages-2/python/requirements.txt' '/home/runner/work/_actions/EnricoMi/publish-unit-test-result-action/branch-composite-cache-pip-packages-2/composite/action.yml'
echo "hash: ${{ hashFiles('/home/runner/work/_actions/EnricoMi/publish-unit-test-result-action/branch-composite-cache-pip-packages-2/python/requirements.txt', '/home/runner/work/_actions/EnricoMi/publish-unit-test-result-action/branch-composite-cache-pip-packages-2/composite/action.yml') }}"
ls -lah file
echo "hash: ${{ hashFiles('file') }}"
shell: bash

- name: Restore PIP packages cache
Expand All @@ -195,7 +181,7 @@ runs:
continue-on-error: true
with:
path: ${{ steps.config.outputs.pip-cache }}
key: enricomi-publish-action-${{ runner.os }}-${{ runner.arch }}-pip-${{ steps.python.outputs.version }}-${{ hashFiles(format('{0}/python/requirements.txt', steps.config.outputs.action-path), format('{0}/composite/action.yml', steps.config.outputs.action-path)) }}
key: enricomi-publish-action-${{ runner.os }}-${{ runner.arch }}-pip-${{ steps.python.outputs.version }}-f3f2c295046c91ed612b4efb6c9fb352

- name: Install Python dependencies
run: |
Expand Down

0 comments on commit bb61605

Please sign in to comment.