Skip to content

Commit

Permalink
Create stats.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Nov 28, 2023
1 parent 7a56938 commit d07d0a5
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/stats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Update stats

on:
schedule:
- cron: "0 0 * * *" # every 24 hours
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate README.md
uses: teoxoy/profile-readme-stats@master
with:
token: ${{ secrets.PAT_TOKEN }}

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
id: verify-changed-files
with:
files: "*.md"

- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add ${{ steps.verify-changed-files.outputs.changed_files }}
git commit -m "Update markdown files"
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT_TOKEN }}
branch: ${{ github.head_ref }}

0 comments on commit d07d0a5

Please sign in to comment.