nuclei-templates/.github/workflows/new-templates.yml

41 lines
1.1 KiB
YAML
Raw Normal View History

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'
workflow_dispatch:
2024-01-15 10:09:24 +00:00
release:
types: [published]
env:
NEW_ADDITION_FILE: '.new-additions'
jobs:
new-addition:
runs-on: ubuntu-latest
2022-03-23 15:25:35 +00:00
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v4
with:
2022-02-18 06:10:40 +00:00
fetch-depth: 0
- name: Generate new addition list
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
- uses: projectdiscovery/actions/setup/git@v1
- uses: projectdiscovery/actions/commit@v1
with:
files: '${{ env.NEW_ADDITION_FILE }}'
message: 'chore: generate new addition list 🤖'
- run: |
git pull origin $GITHUB_REF --rebase
git push origin $GITHUB_REF
2024-01-10 15:09:29 +00:00
sync:
needs: new-addition
2024-08-08 20:16:18 +00:00
uses: ./.github/workflows/templates-sync.yml
secrets: inherit