Skip to content

Clones

Clones #787

Workflow file for this run

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 "[email protected]"
git commit -m "Automated clone.json update"
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}