Skip to content

Commit b2cebd8

Browse files
authored
Refactor GitHub Actions workflow for repository search
Updated search_github.yml to modify cron schedule comment, adjust paths for results and requirements, and add WORKER_API_URL secret.
1 parent aeab04d commit b2cebd8

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
# scripts/github/workflows/search_repos.py
2-
31
# File: .github/workflows/search.yml
42
name: Cloudflare Worker Repository Search
53

64
on:
75
schedule:
8-
- cron: '0 0 * * 0'
6+
- cron: '0 0 * * 0' # Weekly, or change to '0 0 * * *' for daily
97
workflow_dispatch:
108

119
jobs:
1210
execute-search:
1311
runs-on: ubuntu-latest
14-
1512
steps:
1613
- name: Checkout repository
1714
uses: actions/checkout@v4
@@ -21,25 +18,22 @@ jobs:
2118
with:
2219
python-version: '3.12'
2320
cache: 'pip'
24-
# Explicitly target the nested requirements file so the cache hash doesn't fail
2521
cache-dependency-path: 'scripts/github/workflows/requirements.txt'
2622

2723
- name: Install dependencies
2824
run: |
2925
python -m pip install --upgrade pip
30-
# Execute the install targeting the exact explicit path
3126
python -m pip install -r scripts/github/workflows/requirements.txt
3227
3328
- name: Run Search Script
3429
env:
35-
# Reverted to the native GitHub-provided token to avoid 401/403 errors
3630
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
WORKER_API_URL: ${{ secrets.WORKER_API_URL }} # Add this to your Repo Secrets
3732
run: python scripts/github/workflows/search_repos.py
3833

3934
- name: Upload Search Results Artifact
4035
uses: actions/upload-artifact@v4
4136
with:
4237
name: search-results-json
43-
path: scripts/github/workflows/results.json
44-
retention-days: 14
38+
path: results.json # The script now saves here
4539
if-no-files-found: error

0 commit comments

Comments
 (0)