Skip to content

make hashbrowns

make hashbrowns #1

Workflow file for this run

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 json
uses: actions/upload-artifact@v3
with:
name: dll-hashes
path: 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