Awesome List Generator #53
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: Awesome List Generator | |
| on: | |
| schedule: | |
| # Runs at 00:00 every Monday | |
| - cron: '0 0 * * 1' | |
| workflow_dispatch: | |
| # Allows manual trigger from GitHub UI | |
| jobs: | |
| generate-awesome-list: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Cache repository data | |
| uses: actions/cache@v3 | |
| with: | |
| path: .github/cache | |
| key: ${{ runner.os }}-repo-cache-${{ github.run_id }} | |
| restore-keys: | | |
| ${{ runner.os }}-repo-cache- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests PyGithub openai python-dotenv | |
| - name: Generate Awesome List | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| run: python .github/scripts/generate_awesome_list.py | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| commit-message: 'Update awesome-list README.md' | |
| title: 'Update Awesome List' | |
| body: 'This PR updates the awesome-list README.md with the latest public repositories in the organization.' | |
| branch: 'update-awesome-list' | |
| base: 'main' | |
| add-paths: | | |
| README.md | |
| .github/cache/repo_cache.json |