【发布时间】:2021-08-17 12:26:36
【问题描述】:
我正在使用 cache GitHub 操作,并且正在使用内置的 hashFiles 函数生成缓存键:
key: ${{ runner.os }}-${{ hashFiles('./packages/protocol/{,!(node_modules)}**/*') }}-coverage-lcov
但是,上面的命令不起作用。我在 GitHub Actions 日志中看到的是这样的:
使用密钥保存的缓存:Linux--coverage-lcov
没有生成哈希,大概是因为 glob 不正确。如何正确忽略提供给hashFiles 函数的路径中的node_modules 文件夹?
【问题讨论】:
标签: github-actions glob