mirror of
https://github.com/danielmiessler/SecLists.git
synced 2025-04-29 10:16:30 -04:00
Added workflow file that runs on push
This commit is contained in:
parent
c321cad02e
commit
ad89f86cc0
1 changed files with 36 additions and 0 deletions
36
.github/workflows/readme-updater.yml
vendored
Normal file
36
.github/workflows/readme-updater.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
# If you change the commit message you need to change .bin/get-and-patch-readme-repository-details.py
|
||||
|
||||
name: Readme updater - Updates readme with latest stats
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
update-readme:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Update readme
|
||||
run: .bin/get-and-patch-readme-repository-details.py
|
||||
|
||||
- name: Commit files if changed
|
||||
run: |
|
||||
git add -N .
|
||||
|
||||
if [ -z "$(git ls-files --modified)" ]; then
|
||||
echo "[+] No files were changed"
|
||||
else
|
||||
echo "[+] Files were changed! Pushing changed..."
|
||||
git add -A
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
||||
git config --local user.email "example@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git commit -m "[Github Action] Automated readme update."
|
||||
git push
|
||||
fi
|
||||
|
Loading…
Add table
Reference in a new issue