Compare commits

...

10 Commits

Author SHA1 Message Date
Ronaldson Bellande
f58ed7678f Update README.md 2024-07-16 17:47:20 -04:00
Ronaldson Bellande
630d6a2f61 Update README.md 2024-06-27 08:37:32 -04:00
GitHub Action
08ee02d000 create clone count badge 2024-06-27 12:07:46 +00:00
Ronaldson Bellande
961c58b49e Create clone.yml 2024-06-27 07:51:05 -04:00
Ronaldson Bellande
39ec3507c9 Update README.md 2024-06-26 21:53:11 -04:00
Ronaldson Bellande
a357f5852e Create README.md 2024-06-26 21:52:59 -04:00
18de0da9b1 latest pushes 2024-06-25 01:02:17 -04:00
38835f03f4 latest pushes 2024-06-24 19:14:14 -04:00
Ronaldson Bellande
0d39aeb8c7 Create README.md 2024-06-22 00:04:32 -04:00
Ronaldson Bellande
e6fef7fdf8 Create README.md 2024-06-22 00:03:08 -04:00
9 changed files with 117 additions and 1 deletions

90
.github/workflows/clone.yml vendored Normal file
View File

@@ -0,0 +1,90 @@
name: GitHub Clone Count Update Everyday
on:
schedule:
- cron: "0 */24 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: gh login
run: echo "${{ secrets.SECRET_TOKEN }}" | gh auth login --with-token
- name: parse latest clone count
run: |
curl --user "${{ github.actor }}:${{ secrets.SECRET_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/traffic/clones \
> clone.json
- name: create gist and download previous count
id: set_id
run: |
if gh secret list | grep -q "GIST_ID"
then
echo "GIST_ID found"
echo "GIST=${{ secrets.GIST_ID }}" >> $GITHUB_OUTPUT
curl https://gist.githubusercontent.com/${{ github.actor }}/${{ secrets.GIST_ID }}/raw/clone.json > clone_before.json
if cat clone_before.json | grep '404: Not Found'; then
echo "GIST_ID not valid anymore. Creating another gist..."
gist_id=$(gh gist create clone.json | awk -F / '{print $NF}')
echo $gist_id | gh secret set GIST_ID
echo "GIST=$gist_id" >> $GITHUB_OUTPUT
cp clone.json clone_before.json
git rm --ignore-unmatch CLONE.md
fi
else
echo "GIST_ID not found. Creating a gist..."
gist_id=$(gh gist create clone.json | awk -F / '{print $NF}')
echo $gist_id | gh secret set GIST_ID
echo "GIST=$gist_id" >> $GITHUB_OUTPUT
cp clone.json clone_before.json
fi
- name: update clone.json
run: |
curl https://raw.githubusercontent.com/MShawon/github-clone-count-badge/master/main.py > main.py
python3 main.py
- name: Update gist with latest count
run: |
content=$(sed -e 's/\\/\\\\/g' -e 's/\t/\\t/g' -e 's/\"/\\"/g' -e 's/\r//g' "clone.json" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
echo '{"description": "${{ github.repository }} clone statistics", "files": {"clone.json": {"content": "'"$content"'"}}}' > post_clone.json
curl -s -X PATCH \
--user "${{ github.actor }}:${{ secrets.SECRET_TOKEN }}" \
-H "Content-Type: application/json" \
-d @post_clone.json https://api.github.com/gists/${{ steps.set_id.outputs.GIST }} > /dev/null 2>&1
if [ ! -f CLONE.md ]; then
shields="https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url="
url="https://gist.githubusercontent.com/${{ github.actor }}/${{ steps.set_id.outputs.GIST }}/raw/clone.json"
repo="https://github.com/MShawon/github-clone-count-badge"
echo ''> CLONE.md
echo '
**Markdown**
```markdown' >> CLONE.md
echo "[![GitHub Clones]($shields$url&logo=github)]($repo)" >> CLONE.md
echo '
```
**HTML**
```html' >> CLONE.md
echo "<a href='$repo'><img alt='GitHub Clones' src='$shields$url&logo=github'></a>" >> CLONE.md
echo '```' >> CLONE.md
git add CLONE.md
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git commit -m "create clone count badge"
fi
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

13
CLONE.md Normal file
View File

@@ -0,0 +1,13 @@
**Markdown**
```markdown
[![GitHub Clones](https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/RonaldsonBellande/18286e9cfa136b3696998e2d144e2e9c/raw/clone.json&logo=github)](https://github.com/MShawon/github-clone-count-badge)
```
**HTML**
```html
<a href='https://github.com/MShawon/github-clone-count-badge'><img alt='GitHub Clones' src='https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/RonaldsonBellande/18286e9cfa136b3696998e2d144e2e9c/raw/clone.json&logo=github'></a>
```

View File

@@ -1,4 +1,8 @@
# Humanoid Robotics Community Group & Reading Group {ROS/ROS2 Official} {Open Robotics Official}
# Humanoid Robotics Community Group & Reading Group {Robotics Official} {Bellande Technologies Official}
# Repository CLone & Repository View
- Repository View: ![ViewCount](https://views.whatilearened.today/views/github/Robotics-Sensors/BR-SRI-Humanoid-Robotics-PowerPoint.svg)
- Repository CLone: [![GitHub Clones](https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/RonaldsonBellande/18286e9cfa136b3696998e2d144e2e9c/raw/clone.json&logo=github)](https://github.com/MShawon/github-clone-count-badge)
Welcome to the Humanoid Robotics Working Group & Reading Group! This interdisciplinary forum is dedicated to exploring technologies applicable to humanoid robotics, analyzing existing advancements, and identifying areas for further development.

View File

@@ -0,0 +1,3 @@
# Meeting 5 Video
[![Watch the video](https://img.youtube.com/vi/txqtH_vAeOY/0.jpg)](https://www.youtube.com/watch?v=txqtH_vAeOY)

View File

@@ -0,0 +1,3 @@
# Meeting 6 Video
[![Watch the video](https://img.youtube.com/vi/dILattzDt2w/0.jpg)](https://www.youtube.com/watch?v=dILattzDt2w )

View File

@@ -0,0 +1,3 @@
# Meeting 7 Video
[![Watch the video](https://img.youtube.com/vi/2pmgWVHPQ5I/0.jpg)](https://www.youtube.com/watch?v=2pmgWVHPQ5I)