download/.github/workflows/checksums.yml
耗子 d3c80e02a3
Some checks failed
Generate Checksums / checksums (push) Failing after 51s
ci: update
2025-02-28 00:46:43 +08:00

33 lines
1.1 KiB
YAML

name: Generate Checksums
on:
push:
branches:
- main
pull_request:
jobs:
checksums:
runs-on: cn
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate checksums
run: |
set -e
git lfs install --local
# disable credentials by actions/checkout for LFS endpoints
AUTH=$(git config --local http.${{ github.server_url }}/.extraheader)
git config --local --unset http.${{ github.server_url }}/.extraheader
git config --local http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH"
git lfs pull
IFS=$'\n'
for file in $(git ls-files | grep "^panel/" | grep -v ".sha256$" | grep -v ".txt$"); do
filename=$(basename "$file");
sha256sum -b "$file" | sed "s|$file|$filename|" > "${file}.sha256";
done
unset IFS
- name: Commit changes
uses: actions/git-auto-commit-action@v5
with:
commit_message: "chore: update checksums"
file_pattern: "*.sha256"