Update Subscriptions #110
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Subscriptions | |
| on: | |
| schedule: | |
| - cron: "*/10 * * * *" | |
| workflow_dispatch: | |
| jobs: | |
| collect: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run pipeline | |
| env: | |
| TG_API_ID: ${{ secrets.TG_API_ID }} | |
| TG_API_HASH: ${{ secrets.TG_API_HASH }} | |
| run: python main.py | |
| - name: Commit and push generated files | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "actions@github.com" | |
| git add generated/ | |
| git diff --staged --quiet || git commit -m "chore: update subscriptions [skip ci]" | |
| git push |