Discussion Labeler #12
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: Discussion Labeler | |
| on: | |
| schedule: | |
| # Run every hour | |
| - cron: '0 * * * *' | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| label-discussions: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run discussion labeler | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DEFAULT_REPO: ${{ github.repository }} | |
| REQUEST_TIMEOUT: "30" | |
| RUN_INTERVAL_MINUTES: "300" | |
| run: | | |
| # Run once and exit (no need for continuous scheduling in GitHub Actions) | |
| python -c "import basic; basic.process_discussions()" |