2021-05-15 14:45:52 +00:00
|
|
|
name: 🛠 Template Validate
|
|
|
|
|
2021-08-23 11:39:47 +00:00
|
|
|
on: [ push, pull_request ]
|
2021-05-15 14:45:52 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-09-10 12:17:08 +00:00
|
|
|
- uses: actions/checkout@master
|
2021-05-15 14:45:52 +00:00
|
|
|
|
2021-12-25 07:43:56 +00:00
|
|
|
- name: Get latest Nuclei release version
|
|
|
|
id: nuclei-latest
|
|
|
|
uses: actions/github-script@v5
|
2021-10-27 10:04:35 +00:00
|
|
|
with:
|
2021-12-25 07:43:56 +00:00
|
|
|
result-encoding: string
|
|
|
|
script: |
|
|
|
|
const release = await github.rest.repos.getLatestRelease({
|
|
|
|
owner: 'projectdiscovery',
|
|
|
|
repo: 'nuclei',
|
|
|
|
});
|
2021-05-15 14:45:52 +00:00
|
|
|
|
2021-12-25 07:43:56 +00:00
|
|
|
return release.data.name
|
|
|
|
|
|
|
|
- name: Setup Nuclei
|
|
|
|
if: steps.nuclei-latest.outputs.result != ''
|
|
|
|
env:
|
|
|
|
VERSION: ${{ steps.nuclei-latest.outputs.result }}
|
2021-05-15 14:45:52 +00:00
|
|
|
run: |
|
2021-12-25 07:43:56 +00:00
|
|
|
wget -q https://github.com/projectdiscovery/nuclei/releases/download/${VERSION}/nuclei_${VERSION:1}_linux_amd64.zip
|
|
|
|
sudo unzip nuclei*.zip -d /usr/local/bin
|
|
|
|
working-directory: /tmp
|
2021-05-15 14:45:52 +00:00
|
|
|
|
|
|
|
- name: Template Validation
|
|
|
|
run: |
|
2021-12-26 04:47:37 +00:00
|
|
|
cp -r ${{ github.workspace }} $HOME
|
2021-09-11 06:46:55 +00:00
|
|
|
nuclei -validate -t .
|
2021-10-27 10:04:35 +00:00
|
|
|
nuclei -validate -w ./workflows
|