Skip to content

Commit

Permalink
ACTIONS: Add new workflow to count homebrew downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
Cian911 committed Jan 14, 2022
1 parent 0c90a11 commit 07c98dc
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/hb-clone-count.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Homebrew Repo Clone Count

on:
schedule:
- cron: "0 */8 * * *"
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/Cian911/homebrew-switchboard/traffic/clones \
> count.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 "BOT: Update count.json"
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}{

0 comments on commit 07c98dc

Please sign in to comment.