-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrowdcode-branch-visibility.yml
More file actions
59 lines (50 loc) · 1.55 KB
/
crowdcode-branch-visibility.yml
File metadata and controls
59 lines (50 loc) · 1.55 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
52
53
54
55
56
57
58
59
name: CrowdCode - Branch Visibility
on:
push:
branches:
- 'crowdcode/feature-*'
pull_request:
types: [opened, closed, reopened]
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday
workflow_dispatch:
permissions:
contents: write
jobs:
update-dashboard:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need all branches
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install PyGithub pyyaml
- name: Generate Feature Dashboard
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
mkdir -p docs/features
python scripts/generate-dashboard.py
- name: Commit Dashboard Updates
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/features/
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Update feature dashboard [skip ci]"
git push
fi
- name: Summary
run: |
echo "## CrowdCode Branch Visibility Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Feature dashboard updated." >> $GITHUB_STEP_SUMMARY