Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github action file hashFiles() #57

Open
eunchurn opened this issue Dec 14, 2022 · 1 comment · May be fixed by #58
Open

github action file hashFiles() #57

eunchurn opened this issue Dec 14, 2022 · 1 comment · May be fixed by #58

Comments

@eunchurn
Copy link

eunchurn commented Dec 14, 2022

Error

Parse error on line 46:
...{{ runner.os }}-${{ hashFiles('**/packag
-----------------------^
Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'

hashFiles() is github action function

https://docs.github.com/en/actions/learn-github-actions/expressions#hashfiles

How to reproducing

add .github/workflows/unit-test.yml in template/default

write this in any github action template.

      - name: Restore cache
        uses: actions/cache@v3
        with:
          path: |
            node_modules
          key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
          restore-keys: |
            ${{ runner.os }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-

I think ignore glob pattern is needed.

@eunchurn
Copy link
Author

I found handlebars's raw-blocks https://handlebarsjs.com/guide/block-helpers.html#raw-blocks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant