-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (42 loc) · 1.24 KB
/
dllhash.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: make hashbrowns
on:
push:
paths:
- 'dll/latest.dll'
- 'dll/beta.dll'
workflow_dispatch:
jobs:
check_hash:
runs-on: ubuntu-latest
steps:
- name: checkut repo
uses: actions/checkout@v3
- name: check if files exist
id: check_files
run: |
if [ ! -f "dll/latest.dll" ]; then
echo "File latest.dll not found!"
exit 1
fi
if [ ! -f "dll/beta.dll" ]; then
echo "File beta.dll not found!"
exit 1
fi
- name: get hashes for both files
id: calculate_hash
run: |
latest_hash=$(sha256sum dll/latest.dll | awk '{ print $1 }')
beta_hash=$(sha256sum dll/beta.dll | awk '{ print $1 }')
echo '{
"Release": "'$latest_hash'",
"Beta": "'$beta_hash'"
}' > dll_hashes.json
- name: commit file with hashes
if: success()
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add dll_hashes.json
git commit -m "update hashes"
git status
git push