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
|
2024-09-26 11:36:50 +00:00
|
|
|
run: |
|
|
|
|
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
|
|
|
|
git diff --name-only --diff-filter=A $LATEST_TAG @ . | grep -v "^\.github/" | grep "\.yaml$" | tee $NEW_ADDITION_FILE
|
2024-08-05 02:48:40 +00:00
|
|
|
- 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 }}'
|
2024-08-08 21:07:20 +00:00
|
|
|
message: 'chore: generate new addition list 🤖'
|
2024-08-08 23:49:33 +00:00
|
|
|
- run: |
|
|
|
|
git pull origin $GITHUB_REF --rebase
|
|
|
|
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
|
2024-08-08 20:16:18 +00:00
|
|
|
uses: ./.github/workflows/templates-sync.yml
|
2024-08-05 02:48:40 +00:00
|
|
|
secrets: inherit
|