From f17d5a8857df8c2acd980819cde3f25b4f6b7df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Thu, 27 Feb 2025 23:43:13 +0800 Subject: [PATCH] ci: migrate to github actions --- .github/workflows/checksums.yml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checksums.yml b/.github/workflows/checksums.yml index b3d360b..3a17583 100644 --- a/.github/workflows/checksums.yml +++ b/.github/workflows/checksums.yml @@ -1,3 +1,28 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:53759c056ef16c6ea73006b801ca1b43435a1bffdb20ea3c5cf9ff69293ae0ae -size 739 +name: Generate Checksums +on: + push: + branches: + - main + pull_request: +jobs: + checksums: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + lfs: true + + - name: Generate checksums + run: | + set -e + 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 + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "chore: update checksum files" \ No newline at end of file