nuclei-templates/.github/workflows/template-sign.yml

31 lines
860 B
YAML

name: ☑️ Template Sign
on:
push:
branches:
- main
paths:
- '**.yaml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/nuclei@v1
- run: nuclei -lfa -duc -sign -ud $GITHUB_WORKSPACE -t .
env:
NUCLEI_USER_CERTIFICATE: ${{ secrets.NUCLEI_USER_CERTIFICATE }}
NUCLEI_USER_PRIVATE_KEY: ${{ secrets.NUCLEI_USER_PRIVATE_KEY }}
- uses: projectdiscovery/actions/setup/git@v1
- uses: projectdiscovery/actions/commit@v1
with:
files: '.'
message: 'chore: sign templates 🤖'
- name: Push changes
run: |
git pull origin $GITHUB_REF --rebase
git push origin $GITHUB_REF