Merge pull request #15 from Magnus167/add_last_commit_badge

Add step to save last commit date as JSON for Shields.io Badge
This commit is contained in:
Palash Tyagi 2025-04-24 14:24:43 +01:00 committed by GitHub
commit 3ef5581ad9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,6 +67,17 @@ jobs:
color:"blue"}' \
tarpaulin-report.json \
> tarpaulin-badge.json
- name: Save last commit date JSON
run: |
last_commit_date=$(git log -1 --format=%cd --date=short)
jq --arg date "$last_commit_date" \
'{schemaVersion:1,
label:"last-commit-date",
message:$date,
color:"blue"}' \
<(echo '{}') \
> last-commit-date.json
- name: Copy files to output directory
run: |
@ -74,6 +85,7 @@ jobs:
cp tarpaulin-report.html target/doc/rustframe/
cp tarpaulin-report.json target/doc/rustframe/
cp tarpaulin-badge.json target/doc/rustframe/
cp last-commit-date.json target/doc/rustframe/
echo "<meta http-equiv=\"refresh\" content=\"0; url=rustframe\">" > target/doc/index.html
- name: Upload Pages artifact