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

37 lines
1.0 KiB
YAML
Raw Normal View History

2021-05-15 14:45:52 +00:00
name: 🛠 Template Validate
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
- name: Get latest Nuclei release version
id: nuclei-latest
uses: actions/github-script@v5
2021-10-27 10:04:35 +00:00
with:
result-encoding: string
script: |
const release = await github.rest.repos.getLatestRelease({
owner: 'projectdiscovery',
repo: 'nuclei',
});
2021-05-15 14:45:52 +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: |
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: |
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