Skip to content

Commit

Permalink
Update badges
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroc0d3 committed Mar 27, 2022
1 parent bd76cf0 commit 7b0674f
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/clone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: GitHub Clone Count for 14 days at every 6 hours

# Controls when the action will run.
on:
schedule:
- cron: "0 */6 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- 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://github.com/gitapi/repos/${{ github.repository }}/traffic/clones \
> 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 }}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
![tags](https://img.shields.io/github/v/tag/devopscorner/scripts?sort=semver)
![download all](https://img.shields.io/github/downloads/devopscorner/scripts/total.svg)
![download latest](https://img.shields.io/github/downloads/devopscorner/scripts/1.0/total)
![view](https://views.whatilearened.today/views/github/devopscorner/scripts.svg)
![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)
![issues](https://img.shields.io/github/issues/devopscorner/scripts)
![pull requests](https://img.shields.io/github/issues-pr/devopscorner/scripts)
![forks](https://img.shields.io/github/forks/devopscorner/scripts)
![stars](https://img.shields.io/github/stars/devopscorner/scripts)
[![License: CC BY-NC 4.0](https://img.shields.io/github/license/devopscorner/scripts)](https://img.shields.io/github/license/devopscorner/scripts)
[![license](https://img.shields.io/github/license/devopscorner/scripts)](https://img.shields.io/github/license/devopscorner/scripts)

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.

Expand Down
16 changes: 16 additions & 0 deletions clone.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"count": 24,
"uniques": 5,
"clones": [
{
"timestamp": "2022-03-22T00:00:00Z",
"count": 1,
"uniques": 1
},
{
"timestamp": "2022-03-27T00:00:00Z",
"count": 23,
"uniques": 4
}
]
}

0 comments on commit 7b0674f

Please sign in to comment.