misc update
parent
f030b15b1a
commit
58ca327e55
|
@ -1,15 +1,16 @@
|
|||
name: 📝 Readme Update
|
||||
|
||||
on:
|
||||
create:
|
||||
tags:
|
||||
- v*
|
||||
workflow_run:
|
||||
workflows: ["🗒 Templates Stats"]
|
||||
types:
|
||||
- completed
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'projectdiscovery/nuclei-templates' && github.ref == 'refs/heads/master'
|
||||
if: github.repository == 'projectdiscovery/nuclei-templates'
|
||||
steps:
|
||||
- name: Install tree
|
||||
run: sudo apt-get install tree -y
|
||||
|
@ -26,20 +27,20 @@ jobs:
|
|||
python-version: "3.8"
|
||||
|
||||
- name: Update README
|
||||
id: update-readme
|
||||
id: readme-update
|
||||
run: |
|
||||
python .github/scripts/update-readme.py
|
||||
echo "::set-output name=changes::$(git status -s | wc -l)"
|
||||
|
||||
- name: Commit files
|
||||
if: steps.update-readme.outputs.changes > 0
|
||||
if: steps.readme-update.outputs.changes > 0
|
||||
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
|
||||
git commit -m "Auto README Update [$(date)] :robot:" -a
|
||||
|
||||
- name: Push changes
|
||||
if: steps.update-readme.outputs.changes > 0
|
||||
if: steps.readme-update.outputs.changes > 0
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -9,7 +9,7 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'projectdiscovery/nuclei-templates' && github.ref == 'refs/heads/master'
|
||||
if: github.repository == 'projectdiscovery/nuclei-templates'
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/setup-go@v2
|
||||
|
|
Loading…
Reference in New Issue