From 237e48b86bd462d0dc575d6670e8ed396c26e49d Mon Sep 17 00:00:00 2001 From: ZareMate <0.zaremate@gmail.com> Date: Fri, 24 Jan 2025 23:56:54 +0100 Subject: [PATCH] Add GitHub Actions workflow for automatic file listing updates --- .gitea/workflows/auto_list.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .gitea/workflows/auto_list.yml diff --git a/.gitea/workflows/auto_list.yml b/.gitea/workflows/auto_list.yml new file mode 100644 index 0000000..f97fed9 --- /dev/null +++ b/.gitea/workflows/auto_list.yml @@ -0,0 +1,33 @@ +--- +jobs: + update-list: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + - name: Install dependencies + run: | + python -m pip install --upgrade pip + + - name: Run AutoIndex script + run: | + python torrents/AutoIndex.py + + - name: Commit changes + run: | + git config --global user.name 'Gitea Bot' + git config --global user.email 'bot@example.com' + git add readme.md + git commit -m 'Update file listing' + git push +name: Auto List Update +'on': + push: + branches: + - main + paths: + - torrents/** \ No newline at end of file