-
Notifications
You must be signed in to change notification settings - Fork 3
31 lines (27 loc) · 887 Bytes
/
clones.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Clones
# Count (for 14 days every days at 05:00 UTC)
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Parse clone count using REST API
run: |
curl --user "${{ github.actor }}:${{ secrets.SECRET_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/traffic/clones \
> .github/clone.json
- name: Add to git repo
run: |
git add .
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git commit -m "Automated clone.json update"
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}