2022-02-18 06:04:16 +00:00
|
|
|
name: 🥳 New Template List
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-01-05 10:56:27 +00:00
|
|
|
- main
|
2023-01-15 16:05:57 +00:00
|
|
|
paths:
|
|
|
|
- '**.yaml'
|
2022-02-18 06:04:16 +00:00
|
|
|
workflow_dispatch:
|
2024-01-15 10:09:24 +00:00
|
|
|
release:
|
|
|
|
types: [published]
|
2022-02-18 06:04:16 +00:00
|
|
|
|
2024-08-05 02:48:40 +00:00
|
|
|
env:
|
|
|
|
NEW_ADDITION_FILE: '.new-additions'
|
|
|
|
|
2022-02-18 06:04:16 +00:00
|
|
|
jobs:
|
2024-08-05 02:48:40 +00:00
|
|
|
new-addition:
|
2022-02-18 06:04:16 +00:00
|
|
|
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:
|
2024-08-05 02:48:40 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-02-18 06:04:16 +00:00
|
|
|
with:
|
2022-02-18 06:10:40 +00:00
|
|
|
fetch-depth: 0
|
2024-08-05 02:48:40 +00:00
|
|
|
- name: Generate new addition list
|
2022-02-18 06:04:16 +00:00
|
|
|
run: |
|
2022-03-21 12:24:03 +00:00
|
|
|
git pull
|
2024-08-05 02:48:40 +00:00
|
|
|
git diff --name-only --diff-filter=A $(git tag | tail -n 1) @ . | grep .yaml | tee $NEW_ADDITION_FILE
|
|
|
|
- uses: projectdiscovery/actions/setup/git@v1
|
|
|
|
- uses: projectdiscovery/actions/commit@v1
|
2022-02-18 06:04:16 +00:00
|
|
|
with:
|
2024-08-05 02:48:40 +00:00
|
|
|
files: '${{ env.NEW_ADDITION_FILE }}'
|
|
|
|
commit: 'chore: generate new addition list 🤖'
|
|
|
|
- run: git push origin $GITHUB_REF
|
2024-01-10 15:09:29 +00:00
|
|
|
|
2024-08-05 02:48:40 +00:00
|
|
|
sync:
|
|
|
|
needs: new-addition
|
|
|
|
uses: ./.github/workflows/templates-sync.yaml
|
|
|
|
secrets: inherit
|