2022-02-18 06:04:16 +00:00
|
|
|
name: 🥳 New Template List
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
templates:
|
|
|
|
runs-on: ubuntu-latest
|
2022-03-23 15:25:35 +00:00
|
|
|
if: github.repository == 'projectdiscovery/nuclei-templates'
|
2022-02-18 06:04:16 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2022-02-18 06:10:40 +00:00
|
|
|
persist-credentials: false
|
|
|
|
fetch-depth: 0
|
2022-02-18 06:04:16 +00:00
|
|
|
|
|
|
|
- name: Generate new template list
|
|
|
|
id: new-additions
|
|
|
|
run: |
|
2022-03-21 12:24:03 +00:00
|
|
|
git pull
|
2022-02-18 06:04:16 +00:00
|
|
|
git diff --name-only --diff-filter=A $(git tag | tail -n 1) @ . | grep .yaml | tee .new-additions
|
|
|
|
|
|
|
|
- name: Commit files
|
|
|
|
run: |
|
|
|
|
git config --local user.email "action@github.com"
|
|
|
|
git config --local user.name "GitHub Action"
|
|
|
|
git add .new-additions -f
|
2022-02-22 12:45:07 +00:00
|
|
|
git commit --allow-empty -m "Auto Generated New Template Addition List [$(date)] :robot:" -a
|
2022-02-18 06:04:16 +00:00
|
|
|
|
|
|
|
- name: Push changes
|
|
|
|
uses: ad-m/github-push-action@master
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-21 12:24:03 +00:00
|
|
|
branch: ${{ github.ref }}
|