github-actions: Fix incorrect hash key in production install job.

The hash keys were missing hash for package.json and yarn.lock
because they were not present since we don't do a full checkout
in this job. We fix this by sending over those files and generating
hashes from them.

I usally verify these cache keys by clicking the Restore <cache>
step dropdown menu and then clicking the Run ... dropdown menu again
to see the generated hash.
This commit is contained in:
Priyank Patel 2020-08-03 17:58:56 +00:00 committed by Tim Abbott
parent 519b1e9b4d
commit 9504d403b3
2 changed files with 2 additions and 1 deletions

View File

@ -152,7 +152,7 @@ jobs:
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: /srv/zulip-npm-cache path: /srv/zulip-npm-cache
key: v1-yarn-deps-${{ matrix.os }}-${{ hashFiles('package.json') }}-${{ hashFiles('yarn.lock') }} key: v1-yarn-deps-${{ matrix.os }}-${{ hashFiles('/tmp/package.json') }}-${{ hashFiles('/tmp/yarn.lock') }}
restore-keys: v1-yarn-deps-${{ matrix.os }} restore-keys: v1-yarn-deps-${{ matrix.os }}
- name: Do Bionic hack - name: Do Bionic hack

View File

@ -38,5 +38,6 @@ cp -a \
tools/ci/production-verify \ tools/ci/production-verify \
tools/ci/production-upgrade-pg \ tools/ci/production-upgrade-pg \
tools/ci/production-extract-tarball \ tools/ci/production-extract-tarball \
package.json yarn.lock \
\ \
/tmp/production-build /tmp/production-build