File tree 3 files changed +58
-1
lines changed
3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : GitHub Clone Count for 14 days at every 6 hours
2
+
3
+ # Controls when the action will run.
4
+ on :
5
+ schedule :
6
+ - cron : " 0 */6 * * *"
7
+ # Allows you to run this workflow manually from the Actions tab
8
+ workflow_dispatch :
9
+
10
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
11
+ jobs :
12
+ # This workflow contains a single job called "build"
13
+ build :
14
+ # The type of runner that the job will run on
15
+ runs-on : ubuntu-latest
16
+
17
+ # Steps represent a sequence of tasks that will be executed as part of the job
18
+ steps :
19
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20
+ - uses : actions/checkout@v2
21
+
22
+ - name : Parse clone count using REST API
23
+ run : |
24
+ curl --user "${{ github.actor }}:${{ secrets.SECRET_TOKEN }}" \
25
+ -H "Accept: application/vnd.github.v3+json" \
26
+ https://api.github.com/repos/${{ github.repository }}/traffic/clones \
27
+ > clone.json
28
+
29
+ - name : Add to git repo
30
+ run : |
31
+ git add .
32
+ git config --global user.name "GitHub Action"
33
+ git config --global user.email "action@github.com"
34
+ git commit -m "Automated clone.json update"
35
+
36
+ - name : Push
37
+ uses : ad-m/github-push-action@master
38
+ with :
39
+ github_token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 4
4
![ tags] ( https://img.shields.io/github/v/tag/devopscorner/scripts?sort=semver )
5
5
![ download all] ( https://img.shields.io/github/downloads/devopscorner/scripts/total.svg )
6
6
![ download latest] ( https://img.shields.io/github/downloads/devopscorner/scripts/1.0/total )
7
+ ![ view] ( https://views.whatilearened.today/views/github/devopscorner/scripts.svg )
8
+ ![ clone] ( https://img.shields.io/badge/dynamic/json?color=success&label=clone&query=count&url=https://github.com/devopscorner/scripts/blob/master/clone.json?raw=True&logo=github )
7
9
![ issues] ( https://img.shields.io/github/issues/devopscorner/scripts )
8
10
![ pull requests] ( https://img.shields.io/github/issues-pr/devopscorner/scripts )
9
11
![ forks] ( https://img.shields.io/github/forks/devopscorner/scripts )
10
12
![ stars] ( https://img.shields.io/github/stars/devopscorner/scripts )
11
- [ ![ License: CC BY-NC 4.0 ] ( https://img.shields.io/github/license/devopscorner/scripts )] ( https://img.shields.io/github/license/devopscorner/scripts )
13
+ [ ![ license ] ( https://img.shields.io/github/license/devopscorner/scripts )] ( https://img.shields.io/github/license/devopscorner/scripts )
12
14
13
15
Number of installer scripts for userdata pipeline in Amazon Linux. For Ubuntu distribution, will use [ this] ( https://github.com/devopscorner/devopscorner-container/tree/main/scripts ) repository.
14
16
Original file line number Diff line number Diff line change
1
+ {
2
+ "count" : 24 ,
3
+ "uniques" : 5 ,
4
+ "clones" : [
5
+ {
6
+ "timestamp" : " 2022-03-22T00:00:00Z" ,
7
+ "count" : 1 ,
8
+ "uniques" : 1
9
+ },
10
+ {
11
+ "timestamp" : " 2022-03-27T00:00:00Z" ,
12
+ "count" : 23 ,
13
+ "uniques" : 4
14
+ }
15
+ ]
16
+ }
You can’t perform that action at this time.
0 commit comments