-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (43 loc) · 1.38 KB
/
fetch-github-issues.yml
File metadata and controls
52 lines (43 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Fetch GitHub Issues
on:
schedule:
# Run daily at 2 AM UTC
- cron: '0 2 * * *'
workflow_dispatch: # Allow manual triggering
push:
branches:
- main
- master
paths:
- '.github/scripts/fetch_github_issues.py'
- '.github/workflows/fetch-github-issues.yml'
jobs:
fetch-issues:
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Fetch GitHub issues
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python .github/scripts/fetch_github_issues.py
- name: Upload issues artifact
uses: actions/upload-artifact@v4
with:
name: github-issues-cache
path: github_issues_cache.json
retention-days: 30
- name: Display summary
run: |
ISSUE_COUNT=$(jq '.issues | length' github_issues_cache.json)
echo "### GitHub Issues Fetch Summary" >> $GITHUB_STEP_SUMMARY
echo "✅ Successfully fetched **${ISSUE_COUNT}** issues" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "📦 Artifact uploaded: \`github-issues-cache\`" >> $GITHUB_STEP_SUMMARY