File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 16
16
17
17
steps :
18
18
- uses : actions/checkout@v4
19
+ with :
20
+ fetch-depth : 0 # Fetch full history
19
21
20
22
# Install dependencies and setup environment
21
23
- name : Install Dependencies
61
63
curl -o coverage/line-coverage-badge.svg "https://img.shields.io/badge/line%20coverage-${LINE_COVERAGE_PERCENT}%25-brightgreen"
62
64
curl -o coverage/branch-coverage-badge.svg "https://img.shields.io/badge/branch%20coverage-${BRANCH_COVERAGE_PERCENT}%25-brightgreen"
63
65
66
+ # Fix detached HEAD state
67
+ - name : Fix Detached HEAD
68
+ run : git checkout -B ${GITHUB_REF##*/}
69
+ working-directory : ${{ github.workspace }}
70
+
64
71
# Commit badges to a separate branch
65
72
- name : Commit Coverage Badges
66
73
if : ${{ github.event_name == 'push' }}
72
79
git add coverage/branch-coverage-badge.svg
73
80
git commit -m "Update coverage badges"
74
81
git push origin badges
82
+ working-directory : ${{ github.workspace }}
75
83
76
84
# Upload consolidated coverage report as an artifact
77
85
- name : Upload Coverage Report
You can’t perform that action at this time.
0 commit comments