Merge pull request #10363 from projectdiscovery/repace-domains #5200
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🥳 New Template List | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**.yaml' | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
templates: | |
runs-on: ubuntu-latest | |
if: github.repository == 'projectdiscovery/nuclei-templates' | |
steps: | |
- uses: actions/checkout@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Generate new template list | |
id: new-additions | |
run: | | |
git pull | |
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 "[email protected]" | |
git config --local user.name "[PDBot]" | |
git add .new-additions -f | |
git commit --allow-empty -m "Auto Generated New Template Addition List [$(date)] :robot:" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
- name: Trigger Remote Workflow with curl | |
run: | | |
curl -i -s -k -X 'POST' -H 'Host: api.github.com' -H "Authorization: token ${{ secrets.GTOKEN }}" --data-binary $'{\"ref\":\"main\"}' 'https://api.github.com/repos/projectdiscovery/early-templates/actions/workflows/reposync.yml/dispatches' |