Skip to content

Commit 79b0451

Browse files
Merge pull request #19 from amd/dholanda/workflow_mapping
Enable workflow for managing issues
2 parents e88b55e + f17452e commit 79b0451

2 files changed

Lines changed: 53 additions & 1 deletion

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
def fetch_github_issues():
1010
"""Fetch GitHub issues from the repository"""
11-
repo = "lemonade-sdk/halo_website"
11+
repo = "amd/halo_playbooks"
1212
token = os.environ.get("GITHUB_TOKEN", "")
1313

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

0 commit comments

Comments
 (0)