Skip to content

Update github stars #72

Update github stars

Update github stars #72

Workflow file for this run

name: Update github stars
on:
schedule:
- cron: '0 0 * * 3' # Every Wednesday at midnight UTC
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Init repo
run: |
git config --global user.name 'stn1slv'
git config --global user.email 'stn1slv@users.noreply.github.com'
git pull origin main
- name: Download Markdown GitHub Stars updater
run: |
wget -O markdown-github-stars-updater https://github.com/stn1slv/markdown-github-stars-updater/releases/latest/download/markdown-github-stars-updater-linux-amd64
- name: Make executable
run: chmod +x ./markdown-github-stars-updater
# - name: Debug Information
# run: |
# pwd # Print current working directory
# ls # List files in the current directory
# echo $PATH # Print the PATH environment variable
# dpkg --print-architecture
# - name: Print Executable Information
# run: file ./markdown-github-stars-updater
- name: Execute
run: ./markdown-github-stars-updater ./README.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit report
run: |
# Check if there are any changes
if [ -n "$(git diff --exit-code)" ]; then
git status
git add README.md
git commit -am "Github stars updated"
git push origin main
else
echo "No changes to commit."
fi