Skip to content

Update README.md

Update README.md #24

name: Update README Table
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate Markdown table
run: |
folders=$(find . -type d -regex ".*/ASVS_[0-9]+_[0-9]+_[0-9]+")
echo "## ASVS Pages" >> README.md
echo "| ASVS Req. ID | Link |" >> README.md
echo "|---|---|" >> README.md
for folder in $folders; do
req_id=$(basename "$folder" | sed 's/ASVS_\([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/ASVS \1.\2.\3/')
link="https://snbig.github.io/Vulnerable-Pages/${folder/.\//}"
echo "| $req_id | [$link]($link) |" >> README.md
done
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update README table
commit_user_name: GitHub Actions
commit_user_email: github-actions[bot]@users.noreply.github.com
branch: main # Replace with your desired branch
file_pattern: README.md