File tree 1 file changed +27
-3
lines changed
1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,34 @@ jobs:
51
51
- name : Print raw JSON
52
52
run : cat clone_stats.json
53
53
54
- - name : Parse and Print Stats
54
+ - name : Parse clone stats
55
55
id : parse
56
56
run : |
57
57
COUNT=$(jq '.count' clone_stats.json)
58
58
UNIQUES=$(jq '.uniques' clone_stats.json)
59
- echo "Total Clones: $COUNT"
60
- echo "Unique Cloners: $UNIQUES"
59
+ echo "count=$COUNT" >> "$GITHUB_OUTPUT"
60
+ echo "uniques=$UNIQUES" >> "$GITHUB_OUTPUT"
61
+
62
+ - name : Send email
63
+ uses : dawidd6/action-send-mail@v3
64
+ with :
65
+ # Replace with your SMTP server, port, and credentials
66
+ server_address : smtp.sendgrid.net
67
+ server_port : 587
68
+ username : ${{ secrets.SMTP_USERNAME }}
69
+ password : ${{ secrets.SMTP_PASSWORD }}
70
+ subject : " 📊 Weekly GitHub Clone Stats for ${{ github.repository }}"
71
+ to : ${{ vars.EMAIL_TO }}
72
+ from : ${{ vars.EMAIL_FROM }}
73
+ # "text/html" is optional if you want to send as HTML
74
+ content_type : text/plain
75
+ secure : true
76
+ body : |
77
+ Hi,
78
+
79
+ Here are the clone stats for *${{ github.repository }}* this week:
80
+
81
+ 🔁 Total Clones: ${{ steps.parse.outputs.count }}
82
+ 👤 Unique Cloners: ${{ steps.parse.outputs.uniques }}
83
+
84
+ – GitHub Bot
You can’t perform that action at this time.
0 commit comments