From 0fb018f45b67e597fef558e41caa47f56345083e Mon Sep 17 00:00:00 2001 From: Hamed Salimian Date: Sat, 30 Nov 2024 08:09:50 +0330 Subject: [PATCH] Create template-sign.yml Create automate template signing action. Signed-off-by: Hamed Salimian --- .github/workflows/template-sign.yml | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/template-sign.yml diff --git a/.github/workflows/template-sign.yml b/.github/workflows/template-sign.yml new file mode 100644 index 0000000..a6cdf75 --- /dev/null +++ b/.github/workflows/template-sign.yml @@ -0,0 +1,30 @@ +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