📝 nuclei-update #4510
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: 📝 nuclei-update | |
on: | |
schedule: | |
- cron: '1 */6 * * *' | |
push: | |
paths: | |
- 'plugins' | |
workflow_run: | |
workflows: [ "📝 fingerprint-update" ] | |
types: | |
- completed | |
workflow_dispatch: | |
env: | |
IS_GITHUB: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.repository == '0x727/FingerprintHub' | |
steps: | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Check out code | |
uses: actions/checkout@master | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Build | |
run: cargo build --release | |
- name: Clone nuclei-templates | |
run: | | |
git clone --depth 100 --branch main https://github.com/projectdiscovery/nuclei-templates | |
./target/release/helper --sync | |
- name: Update Nuclei | |
id: update-nuclei | |
run: | | |
echo "::set-output name=changes::$(git status -s | wc -l)" | |
echo "::set-output name=changes_name::$(git status -s)" | |
- name: Commit files | |
if: steps.update-nuclei.outputs.changes > 0 | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Auto Update Nuclei [$(date)] :robot:" -a | |
- name: Push changes | |
if: steps.update-nuclei.outputs.changes > 0 | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
- name: Create Plugins Zip | |
run: | | |
zip -r plugins.zip plugins | |
- name: Upload plugins.zip to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: plugins.zip | |
asset_name: plugins.zip | |
tag: defaultv4 | |
overwrite: true |