From 23665d701532ffb6d5eb9a5111c64dfd566a6868 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 2 Mar 2026 10:29:45 +0000 Subject: [PATCH] Add --- .gitea/workflows/txt-hashes.yml | 41 +++++++++++++++++++++++++++++++++ a.txt | 0 b.txt | 1 + 3 files changed, 42 insertions(+) create mode 100644 .gitea/workflows/txt-hashes.yml create mode 100644 a.txt create mode 100644 b.txt diff --git a/.gitea/workflows/txt-hashes.yml b/.gitea/workflows/txt-hashes.yml new file mode 100644 index 0000000..54f8780 --- /dev/null +++ b/.gitea/workflows/txt-hashes.yml @@ -0,0 +1,41 @@ +name: Hash all .txt files + +on: + push: + branches: + - main + +jobs: + txt_hashes: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Compute SHA-256 hashes for all .txt files + shell: bash + run: | + set -euo pipefail + + # Find all .txt files, sort deterministically, hash each, and output "hash path" + # Then hash the manifest itself so you can compare runs easily. + manifest="txt_sha256_manifest.txt" + + find . -type f -name '*.txt' -print0 \ + | LC_ALL=C sort -z \ + | xargs -0 sha256sum \ + | sed 's|^\([0-9a-f]\+\) \./|\1 |' \ + > "${manifest}" + + echo "---- Manifest (${manifest}) ----" + cat "${manifest}" + + echo "---- Manifest SHA-256 ----" + sha256sum "${manifest}" + + # Optional: keep the manifest as a downloadable artifact (if your Gitea Actions setup supports artifacts) + # - name: Upload manifest artifact + # uses: actions/upload-artifact@v4 + # with: + # name: txt-sha256-manifest + # path: txt_sha256_manifest.txt diff --git a/a.txt b/a.txt new file mode 100644 index 0000000..e69de29 diff --git a/b.txt b/b.txt new file mode 100644 index 0000000..7898192 --- /dev/null +++ b/b.txt @@ -0,0 +1 @@ +a