This commit is contained in:
24
.gitea/workflows/generate-hash.yaml
Normal file
24
.gitea/workflows/generate-hash.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Generate SHA256 Hashes
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
hash:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Generate Hashes
|
||||
run: |
|
||||
# On boucle sur tous les fichiers .sh dans le dossier spécifique
|
||||
cd servers/linux/
|
||||
for file in *.sh; do
|
||||
sha256sum "$file" > "${file}.sha256"
|
||||
done
|
||||
|
||||
- name: Commit and Push
|
||||
run: |
|
||||
git config --global user.name "Gitea Action"
|
||||
git config --global user.email "actions@noreply.gitea.io"
|
||||
git add servers/linux/*.sha256
|
||||
git diff --quiet && git diff --staged --quiet || git commit -m "Auto-update SHA256 hashes"
|
||||
git push
|
||||
Reference in New Issue
Block a user