name: Generate Checksums on: push: branches: - main pull_request: jobs: checksums: runs-on: cn steps: - name: Checkout repository uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} lfs: true - name: Generate checksums run: | set -e git lfs install --local # disable credentials by actions/checkout for LFS endpoints git -c "http.${GITHUB_SERVER_URL}/storage/lfs/.extraHeader=" 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"