diff --git a/gitea/workflows/generate-hash.yaml b/gitea/workflows/generate-hash.yaml new file mode 100644 index 0000000..e11fc76 --- /dev/null +++ b/gitea/workflows/generate-hash.yaml @@ -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 \ No newline at end of file