Skip to content

Commit

Permalink
Add resource zip hash verification
Browse files Browse the repository at this point in the history
  • Loading branch information
magmaus3 committed Mar 22, 2023
1 parent 4919e87 commit 8e50abc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ jobs:
if: ${{ steps.resources-cache.outputs.cache-hit != 'true' }}
run: |
wget $(curl https://anonfiles.com/EbA6Gffcz3/Resources_2_1_zip | grep "https://cdn-[0-9]*.anonfiles.com/.*/Resources-2.1.zip" --only-matching) -O Resources.zip --no-clobber || true
- name: Verify hash
run: |
echo "b4b53b77dcc508a90fbffb601ec41e81e04dabbe7d0e9328a239c0dcf0a01843 Resources.zip" | sha256sum -c
- name: Extract resources
run: unzip Resources.zip
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
run: |
wget $(curl https://anonfiles.com/EbA6Gffcz3/Resources_2_1_zip | grep "https://cdn-[0-9]*.anonfiles.com/.*/Resources-2.1.zip" --only-matching) -O Resources.zip --no-clobber || true
- name: Verify hash
run: |
echo "b4b53b77dcc508a90fbffb601ec41e81e04dabbe7d0e9328a239c0dcf0a01843 Resources.zip" | sha256sum -c
- name: Extract resources
run: unzip Resources.zip

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
- name: Download resources
if: ${{ steps.resources-cache.outputs.cache-hit != 'true' }}
run: 'if (!(Test-Path "Resources.zip")) {Invoke-RestMethod $(Invoke-RestMethod https://anonfiles.com/EbA6Gffcz3/Resources_2_1_zip | Select-String -Pattern "https://cdn-[0-9]*.anonfiles.com/.*/Resources-2.1.zip" | foreach {$_.Matches.Value}) -OutFile Resources.zip}'

- name: Verify hash
run: |
if((Get-FileHash Resources.zip).Hash -ne "b4b53b77dcc508a90fbffb601ec41e81e04dabbe7d0e9328a239c0dcf0a01843") {exit 1}
- name: Extract resources
run: unzip Resources.zip

Expand Down

0 comments on commit 8e50abc

Please sign in to comment.