Commit 5c9b76ba authored by Jerome Wu's avatar Jerome Wu

Use git hash in workflow

parent ea987707
...@@ -43,13 +43,15 @@ jobs: ...@@ -43,13 +43,15 @@ jobs:
submodules: recursive submodules: recursive
- name: Cache libs - name: Cache libs
uses: actions/cache@v2 uses: actions/cache@v2
env:
GIT_HASH: $(git rev-parse --short HEAD)
with: with:
path: | path: |
build build
wasm/cache wasm/cache
key: ${{ env.CACHE_KEY_PREFIX }}-${{ env.GITHUB_RUN_ID }}-${{ matrix.script }} key: ${{ env.CACHE_KEY_PREFIX }}-${{ env.GIT_HASH }}-${{ matrix.script }}
restore-keys: | restore-keys: |
${{ env.CACHE_KEY_PREFIX }}-${{ env.GITHUB_RUN_ID }}- ${{ env.CACHE_KEY_PREFIX }}-${{ env.GIT_HASH }}-
- name: List cached libs - name: List cached libs
run: ls build/lib || true run: ls build/lib || true
- name: Build FFMpeg Libs - name: Build FFMpeg Libs
...@@ -63,13 +65,15 @@ jobs: ...@@ -63,13 +65,15 @@ jobs:
submodules: recursive submodules: recursive
- name: Cache multiple paths - name: Cache multiple paths
uses: actions/cache@v2 uses: actions/cache@v2
env:
GIT_HASH: $(git rev-parse --short HEAD)
with: with:
path: | path: |
build build
wasm/cache wasm/cache
key: ${{ env.CACHE_KEY_PREFIX }}-${{ env.GITHUB_RUN_ID }}-ffmpeg key: ${{ env.CACHE_KEY_PREFIX }}-${{ env.GIT_HASH }}-ffmpeg
restore-keys: | restore-keys: |
${{ env.CACHE_KEY_PREFIX }}-${{ env.GITHUB_RUN_ID }}- ${{ env.CACHE_KEY_PREFIX }}-${{ env.GIT_HASH }}-
- name: List cached libs - name: List cached libs
run: ls build/lib || true run: ls build/lib || true
- name: Build FFMpeg - name: Build FFMpeg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment