2021-05-15 14:30:13 +00:00
|
|
|
name: 📝 Readme Update
|
2020-11-16 22:59:12 +00:00
|
|
|
|
|
|
|
on:
|
2020-11-19 17:40:08 +00:00
|
|
|
create:
|
|
|
|
tags:
|
|
|
|
- v*
|
2021-07-20 07:55:28 +00:00
|
|
|
workflow_dispatch:
|
2020-11-16 22:59:12 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2021-03-10 13:27:04 +00:00
|
|
|
if: github.repository == 'projectdiscovery/nuclei-templates' && github.ref == 'refs/heads/master'
|
2020-11-16 22:59:12 +00:00
|
|
|
steps:
|
2020-11-16 23:43:59 +00:00
|
|
|
- name: Install tree
|
|
|
|
run: sudo apt-get install tree -y
|
|
|
|
|
2020-11-16 23:02:12 +00:00
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@master
|
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
fetch-depth: 0
|
2020-11-16 22:59:12 +00:00
|
|
|
|
2020-11-16 23:02:12 +00:00
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: "3.8"
|
2020-11-16 22:59:12 +00:00
|
|
|
|
2020-11-16 23:02:12 +00:00
|
|
|
- name: Update README
|
2021-03-19 19:47:36 +00:00
|
|
|
id: update-readme
|
2020-11-16 23:02:12 +00:00
|
|
|
run: |
|
2020-11-17 18:23:48 +00:00
|
|
|
python .github/scripts/update-readme.py
|
2021-03-19 19:47:36 +00:00
|
|
|
echo "::set-output name=changes::$(git status -s | wc -l)"
|
2020-11-16 22:59:12 +00:00
|
|
|
|
2020-11-16 23:02:12 +00:00
|
|
|
- name: Commit files
|
2021-03-19 19:47:36 +00:00
|
|
|
if: steps.update-readme.outputs.changes > 0
|
2020-11-16 23:02:12 +00:00
|
|
|
run: |
|
|
|
|
git config --local user.email "action@github.com"
|
|
|
|
git config --local user.name "GitHub Action"
|
|
|
|
git commit -m "Auto Update README [$(date)] :robot:" -a
|
2020-11-16 22:59:12 +00:00
|
|
|
|
2020-11-16 23:02:12 +00:00
|
|
|
- name: Push changes
|
2021-03-19 19:47:36 +00:00
|
|
|
if: steps.update-readme.outputs.changes > 0
|
2020-11-16 23:02:12 +00:00
|
|
|
uses: ad-m/github-push-action@master
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2020-11-19 17:40:08 +00:00
|
|
|
branch: ${{ github.ref }}
|