File tree Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,16 @@ jobs:
2020 with :
2121 gradle-home-cache-excludes : |
2222 caches/neoformruntime/assets
23- - name : Cache Minecraft assets
24- uses : actions/cache@v4
23+ - name : Restore cached Minecraft assets
24+ uses : actions/cache/restore @v4
2525 with :
2626 path : |
2727 ~/.gradle/caches/neoformruntime/assets
28- key : mc-assets
29- - name : Test adding a fake asset
30- run : |
31- mkdir -p ~/.gradle/caches/neoformruntime/assets/modern_industrialization
32- echo "This is a test asset" > ~/.gradle/caches/neoformruntime/assets/modern_industrialization/test.txt
28+ restore-keys : mc-assets
29+ # - name: Test adding a fake asset
30+ # run: |
31+ # mkdir -p ~/.gradle/caches/neoformruntime/assets/modern_industrialization
32+ # echo "This is a test asset" > ~/.gradle/caches/neoformruntime/assets/modern_industrialization/test.txt
3333 - name : Build with Gradle
3434 run : ./gradlew build
3535 env :
4242 with :
4343 name : Modern Industrialization ${{ steps.var.outputs.commit_hash }}
4444 path : build/libs
45+ - name : Hash Minecraft assets
46+ id : hash-assets
47+ run : |
48+ find ~/.gradle/caches/neoformruntime/assets -type f -exec sha256sum {} + | sort | sha256sum | cut -d ' ' -f 1 > assets-hash.txt
49+ echo "assets_hash=$(cat assets-hash.txt)" >> $GITHUB_ENV
50+ echo "::set-output name=assets_hash::$(cat assets-hash.txt)"
51+ - name : Cache Minecraft assets
52+ uses : actions/cache/save@v4
53+ with :
54+ path : |
55+ ~/.gradle/caches/neoformruntime/assets
56+ key : mc-assets-${{ steps.hash-assets.outputs.assets_hash }}
You can’t perform that action at this time.
0 commit comments