-
-
Notifications
You must be signed in to change notification settings - Fork 40
32 lines (30 loc) · 1.15 KB
/
app-stats.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: App Stats
on:
schedule:
- cron: '0 6 * * *'
jobs:
log:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gr2m/app-stats-action@v1.x
id: stats
with:
id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- run: "echo '{\"installations\": ${{ steps.stats.outputs.installations }}, \"repositories\": ${{ steps.stats.outputs.repositories }}, \"suspended\": ${{ steps.stats.outputs.suspended_installations }}, \"popular\": ${{ steps.stats.outputs.popular_repositories }} }' > static/stats.json"
- name: Commit Action Installation Statistics
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add static/stats.json
git commit -m "Build by GitHub Actions" || true
if: job.status == 'success'
- name: Update repo
run: git pull --no-rebase
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
if: job.status == 'success'