添加 .gitea/workflows/gendiff.yml

This commit is contained in:
azw
2025-02-12 17:10:17 +08:00
commit b776580c00

View File

@@ -0,0 +1,30 @@
name: gendiff
run-name:
on:
schedule:
- cron: '30 4 * * *'
issues:
types: [edited]
jobs:
gendiff:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Gen Diff
run: |
bash tools/diff.sh
git config user.name test
git config user.email test@github.com
git add .
git commit --allow-empty -m "$(date '+%Y-%m-%d %H:%M:%S')"
git diff main origin/main --name-only > diff
zip -@ archive.zip < diff
- name: Upload
uses: https://gitea.com/actions/gitea-release-action@v1
with:
files: |-
archive.zip
api_key: '${{ secrets.GITHUB_TOKEN }}'
tag_name: 'Diff'