Skip to content

🗒 Templates Stats #722

🗒 Templates Stats

🗒 Templates Stats #722

name: 🗒 Templates Stats
on:
schedule:
- cron: '25 6 * * *'
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Parse readme
run: |
python /home/runner/work/nuclei-wordfence-cve/nuclei-wordfence-cve/src/scripts/parse_readme.py
- name: Get statistical changes
id: stats
run: git status -s | wc -l | xargs -I {} echo CHANGES={} >> $GITHUB_OUTPUT
- name: Commit files
if: steps.stats.outputs.CHANGES > 0
run: |
git add README.md
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Auto Updated README statistics [$(date)] :robot:" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}