Skip to content

Commit 83391d6

Browse files
committed
Only generate badges and upload artifacts on push to master
1 parent e207ff2 commit 83391d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: uv run pytest tests/ -m "not hardware" --cov=kdbxtool --cov-report=xml --cov-report=html
2828

2929
- name: Generate coverage badge JSON
30-
if: matrix.python-version == '3.12'
30+
if: matrix.python-version == '3.12' && github.event_name == 'push'
3131
run: |
3232
# Extract coverage percentage from HTML report
3333
COVERAGE=$(python -c "
@@ -62,7 +62,7 @@ jobs:
6262
EOF
6363
6464
- name: Upload coverage artifact
65-
if: matrix.python-version == '3.12'
65+
if: matrix.python-version == '3.12' && github.event_name == 'push'
6666
uses: actions/upload-artifact@v4
6767
with:
6868
name: coverage-report
@@ -87,6 +87,7 @@ jobs:
8787
run: uv run mypy --strict --html-report mypy-report src/kdbxtool
8888

8989
- name: Generate mypy badge JSON
90+
if: github.event_name == 'push'
9091
run: |
9192
# Extract imprecise percentage from mypy index.html
9293
IMPRECISE=$(python -c "
@@ -122,6 +123,7 @@ jobs:
122123
EOF
123124
124125
- name: Upload mypy artifact
126+
if: github.event_name == 'push'
125127
uses: actions/upload-artifact@v4
126128
with:
127129
name: mypy-report

0 commit comments

Comments
 (0)