Skip to content

Commit 1bf4ff3

Browse files
authored
Merge pull request #15 from UniDash-Linux/feature/1-1-project-init
Feature/1 1 project init
2 parents 54cc432 + 77c6868 commit 1bf4ff3

File tree

5 files changed

+152
-12
lines changed

5 files changed

+152
-12
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Branch Policy
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
check-branch:
9+
name: Check source branch
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Verify source branch
13+
run: |
14+
SOURCE_BRANCH="${{ github.head_ref }}"
15+
echo "Source branch: $SOURCE_BRANCH"
16+
17+
# Allow PRs from develop or fix/* branches only
18+
if [[ "$SOURCE_BRANCH" == "develop" ]] || [[ "$SOURCE_BRANCH" == fix/* ]]; then
19+
echo "✓ PR from '$SOURCE_BRANCH' to main is allowed"
20+
else
21+
echo "✗ PR from '$SOURCE_BRANCH' to main is NOT allowed"
22+
echo ""
23+
echo "Only the following branches can merge to main:"
24+
echo " - develop"
25+
echo " - fix/*"
26+
echo ""
27+
echo "Please merge your changes to develop first."
28+
exit 1
29+
fi

.github/workflows/ci-python.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@ jobs:
2525
needs: changes
2626
if: needs.changes.outputs.python == 'true'
2727
runs-on: ubuntu-latest
28-
strategy:
29-
matrix:
30-
python-version: ["3.13"]
3128

3229
steps:
3330
- uses: actions/checkout@v6
3431

35-
- name: Set up Python ${{ matrix.python-version }}
32+
- name: Set up Python
3633
uses: actions/setup-python@v6
3734
with:
38-
python-version: ${{ matrix.python-version }}
35+
python-version: "3.13"
3936

4037
- name: Install dependencies
4138
run: |

.github/workflows/update-screenshots.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,37 @@ name: Update Screenshots
33
on:
44
push:
55
branches: [develop]
6-
paths:
7-
- "_bmad-output/planning-artifacts/ux-design-directions.html"
8-
- "scripts/generate-screenshots.mjs"
6+
pull_request:
7+
branches: [develop, main]
98
workflow_dispatch:
109

1110
jobs:
11+
changes:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
mockups: ${{ steps.filter.outputs.mockups }}
15+
steps:
16+
- uses: actions/checkout@v6
17+
- uses: dorny/paths-filter@v3
18+
id: filter
19+
with:
20+
filters: |
21+
mockups:
22+
- '_bmad-output/planning-artifacts/ux-design-directions.html'
23+
- 'scripts/generate-screenshots.mjs'
24+
1225
generate:
26+
needs: changes
27+
if: needs.changes.outputs.mockups == 'true'
1328
runs-on: ubuntu-latest
1429

1530
steps:
16-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v6
32+
with:
33+
ref: develop
1734

1835
- name: Setup Node.js
19-
uses: actions/setup-node@v4
36+
uses: actions/setup-node@v6
2037
with:
2138
node-version: "22"
2239
cache: "npm"
@@ -36,7 +53,7 @@ jobs:
3653
git diff --quiet docs/src/assets/screenshots/ || echo "changed=true" >> $GITHUB_OUTPUT
3754
3855
- name: Create Pull Request
39-
if: steps.changes.outputs.changed == 'true'
56+
if: steps.changes.outputs.changed == 'true' && github.event_name == 'push'
4057
uses: peter-evans/create-pull-request@v6
4158
with:
4259
token: ${{ secrets.GITHUB_TOKEN }}
@@ -52,3 +69,10 @@ jobs:
5269
labels: |
5370
automated
5471
documentation
72+
73+
generate-skipped:
74+
needs: changes
75+
if: needs.changes.outputs.mockups != 'true'
76+
runs-on: ubuntu-latest
77+
steps:
78+
- run: echo "No mockup changes detected, skipping screenshot generation"

package-lock.json

Lines changed: 90 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
},
55
"dependencies": {
66
"glob": "^13.0.0"
7-
}
7+
}
88
}

0 commit comments

Comments
 (0)