Create README.md #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🗒 Templates Stats | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- name: Installing Template Stats | |
run: | | |
go install github.com/projectdiscovery/templates-stats@main | |
shell: bash | |
- name: Markdown Stats | |
run: | | |
templates-stats -output TEMPLATES-STATS.md -path /home/runner/work/nuclei-templates/nuclei-templates/ | |
shell: bash | |
- name: JSON Stats | |
run: | | |
templates-stats -output TEMPLATES-STATS.json -json -path /home/runner/work/nuclei-templates/nuclei-templates/ | |
shell: bash | |
- name: Top 10 Stats | |
run: | | |
templates-stats -output TOP-10.md -top 10 -path /home/runner/work/nuclei-templates/nuclei-templates/ | |
shell: bash | |
- 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 TEMPLATES-STATS.* | |
git add TOP-10.md | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git commit -m "Auto Generated Templates Stats [$(date)] :robot:" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |