GitHub Issues Bot #115
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: GitHub Issues Bot | |
| on: | |
| workflow_dispatch: | |
| issues: | |
| types: [opened, edited] | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 9 * * *" | |
| permissions: | |
| issues: write | |
| contents: read | |
| jobs: | |
| bot: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Cache sentence-transformers model | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/huggingface | |
| key: ${{ runner.os }}-hf-model-all-MiniLM-L6-v2 | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run bot | |
| run: python src/main.py | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| REPO_NAME: ${{ github.repository }} | |
| GITHUB_EVENT_NAME: ${{ github.event_name }} | |
| GITHUB_EVENT_PATH: ${{ github.event_path }} | |
| DUPLICATE_METHOD: ${{ vars.DUPLICATE_METHOD }} |