Skip to content

Commit

Permalink
fix caching in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
reinhrst committed Nov 28, 2023
1 parent cbfa657 commit e17b729
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ jobs:
- name: restore libavjs cache
uses: actions/cache@v3
with:
key: libavjs-files--${{ hashFiles('libavjs/*') }}
key: libavjs-files--${{ hashFiles('libav.js/*') }}
path: public/app/bundled/libavjs/
- name: update cache timestamps
# this will update the timestamps on the cache
# this is necessary since the Dockerfile will always be newer (gets
# checkout timestamp).
# However because of the hash, cache only gets restored if the Dockerfile
# is unchanged.
run: make -t public/app/bundled/libavjs/empty && true
- name: install packages
run: npm install .
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $(LIBAVJS_TARGET_FILES): libav.js/Dockerfile
--build-arg="FILES_TO_BUILD=$(LIBAVJS_MAKE_FILES)" \
--target=artifact --output type=local,dest=$(OUTDIR)
@mkdir -p public/app/bundled/libavjs
@cp -Rv $(OUTDIR)/dist public/app/bundled/libavjs
@cp -R $(OUTDIR)/dist public/app/bundled/libavjs

public/app/tsc: tsconfig.json $(shell find src) public/app/bundled/libavjs/empty
@tsc --noEmit
Expand Down

0 comments on commit e17b729

Please sign in to comment.