-
-
Notifications
You must be signed in to change notification settings - Fork 187
73 lines (66 loc) · 1.98 KB
/
update-nuclei.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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 "action@github.com"
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